@@ -22,7 +22,7 @@ func TestUserStatus(t *testing.T) {
22
22
23
23
//nolint:paralleltest
24
24
t .Run ("StatusSelf" , func (t * testing.T ) {
25
- cmd , root := clitest .New (t , "users" , "status" , " suspend" , "me" )
25
+ cmd , root := clitest .New (t , "users" , "suspend" , "me" )
26
26
clitest .SetupConfig (t , client , root )
27
27
// Yes to the prompt
28
28
cmd .SetIn (bytes .NewReader ([]byte ("yes\n " )))
@@ -36,7 +36,7 @@ func TestUserStatus(t *testing.T) {
36
36
t .Run ("StatusOther" , func (t * testing.T ) {
37
37
require .Equal (t , otherUser .Status , codersdk .UserStatusActive , "start as active" )
38
38
39
- cmd , root := clitest .New (t , "users" , "status" , " suspend" , otherUser .Username )
39
+ cmd , root := clitest .New (t , "users" , "suspend" , otherUser .Username )
40
40
clitest .SetupConfig (t , client , root )
41
41
// Yes to the prompt
42
42
cmd .SetIn (bytes .NewReader ([]byte ("yes\n " )))
@@ -48,8 +48,8 @@ func TestUserStatus(t *testing.T) {
48
48
require .NoError (t , err , "fetch suspended user" )
49
49
require .Equal (t , otherUser .Status , codersdk .UserStatusSuspended , "suspended user" )
50
50
51
- // Set back to active
52
- cmd , root = clitest .New (t , "users" , "status " , "active" , otherUser .Username )
51
+ // Set back to active. Try using a uuid as well
52
+ cmd , root = clitest .New (t , "users" , "activate " , otherUser .ID . String () )
53
53
clitest .SetupConfig (t , client , root )
54
54
// Yes to the prompt
55
55
cmd .SetIn (bytes .NewReader ([]byte ("yes\n " )))
0 commit comments