Skip to content

Commit 2afb805

Browse files
committed
Make sure new password is valid after update with token
1 parent 88598b8 commit 2afb805

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/requests/mutations/update_password_with_token_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
user.reload
3535
end.to change(user, :encrypted_password)
3636

37+
expect(user).to be_valid_password(password)
3738
expect(json_response[:data][:userUpdatePasswordWithToken][:credentials]).to be_nil
3839
expect(json_response[:data][:userUpdatePasswordWithToken][:authenticatable]).to include(email: user.email)
3940
end
@@ -107,6 +108,7 @@
107108
admin.reload
108109
end.to change(admin, :encrypted_password)
109110

111+
expect(admin).to be_valid_password(password)
110112
expect(json_response[:data][:adminUpdatePasswordWithToken]).to include(
111113
credentials: { uid: admin.email },
112114
authenticatable: { email: admin.email }

0 commit comments

Comments
 (0)