@@ -1084,22 +1084,24 @@ func TestUpdateUserPassword(t *testing.T) {
1084
1084
require .Equal (t , database .AuditActionWrite , auditor .AuditLogs ()[numLogs - 1 ].Action )
1085
1085
})
1086
1086
1087
- // FIXME: Re-enable the tests once real logic changed
1087
+ // FIXME: Re-enable the tests once real logic changed
1088
1088
// Currently there's no check in code to validate that users have to put the old password
1089
- // t.Run("MemberCantUpdateOwnPasswordWithoutOldPassword", func(t *testing.T) {
1090
- // t.Parallel()
1091
- // client := coderdtest.New(t, nil)
1092
- // owner := coderdtest.CreateFirstUser(t, client)
1093
- // member, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
1094
-
1095
- // ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
1096
- // defer cancel()
1097
-
1098
- // err := member.UpdateUserPassword(ctx, "me", codersdk.UpdateUserPasswordRequest{
1099
- // Password: "newpassword",
1100
- // })
1101
- // require.Error(t, err, "member should not be able to update own password without providing old password")
1102
- // })
1089
+ t .Run ("MemberCantUpdateOwnPasswordWithoutOldPassword" , func (t * testing.T ) {
1090
+ t .Skip ()
1091
+
1092
+ t .Parallel ()
1093
+ client := coderdtest .New (t , nil )
1094
+ owner := coderdtest .CreateFirstUser (t , client )
1095
+ member , _ := coderdtest .CreateAnotherUser (t , client , owner .OrganizationID )
1096
+
1097
+ ctx , cancel := context .WithTimeout (context .Background (), testutil .WaitLong )
1098
+ defer cancel ()
1099
+
1100
+ err := member .UpdateUserPassword (ctx , "me" , codersdk.UpdateUserPasswordRequest {
1101
+ Password : "newpassword" ,
1102
+ })
1103
+ require .Error (t , err , "member should not be able to update own password without providing old password" )
1104
+ })
1103
1105
1104
1106
t .Run ("AuditorCantTellIfPasswordIncorrect" , func (t * testing.T ) {
1105
1107
t .Parallel ()
0 commit comments