- Notifications
You must be signed in to change notification settings - Fork929
feat: Add update user password endpoint#1310
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
346e5e4
4bd7557
de39cf5
2fe1716
212020a
2699445
355f163
56b29fd
30b8f15
f6be255
5df5763
b9dbd64
69af903
d85092b
96ce751
4f9f506
671c56d
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -290,26 +290,12 @@ func TestUpdateUserProfile(t *testing.T) { | ||
func TestUpdateUserPassword(t *testing.T) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Let's also add some tests to make sure the rbac is working here, I'd like to ensure that the user itself cannot perform this action, and neither can other non-admin users. CollaboratorAuthor
| ||
t.Parallel() | ||
t.Run("Success", func(t *testing.T) { | ||
t.Parallel() | ||
client := coderdtest.New(t, nil) | ||
coderdtest.CreateFirstUser(t, client) | ||
err := client.UpdateUserPassword(context.Background(), codersdk.Me, codersdk.UpdateUserPasswordRequest{ | ||
Password: "newpassword", | ||
}) | ||
require.NoError(t, err, "update password request should be successful") | ||