8000 feat: Add suspend/active user to cli by Emyrk · Pull Request #1422 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: Add suspend/active user to cli #1422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 16, 2022
Prev Previous commit
Next Next commit
Fix unit test
  • Loading branch information
Emyrk committed May 13, 2022
commit 5e80192d1a603a4ded86003671a3e3c1e7fdd248
5 changes: 2 additions & 3 deletions coderd/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,9 @@ func TestPutUserSuspend(t *testing.T) {
client := coderdtest.New(t, nil)
coderdtest.CreateFirstUser(t, client)
client.User(context.Background(), codersdk.Me)
suspendedUser, err := client.SetUserStatus(context.Background(), codersdk.Me, codersdk.UserStatusSuspended)
_, err := client.SetUserStatus(context.Background(), codersdk.Me, codersdk.UserStatusSuspended)

require.NoError(t, err)
require.Equal(t, suspendedUser.Status, codersdk.UserStatusSuspended)
require.ErrorContains(t, err, "suspend yourself", "cannot suspend yourself")
})
}

Expand Down
0