diff --git a/spec/controllers/users/passwords_controller_spec.rb b/spec/controllers/users/passwords_controller_spec.rb index 784db1469..b0d942f01 100644 --- a/spec/controllers/users/passwords_controller_spec.rb +++ b/spec/controllers/users/passwords_controller_spec.rb @@ -40,17 +40,16 @@ describe Users::PasswordsController, type: :controller do end it "marks user's email as verified" do - expect(user.email_verified_at).to be_nil - - put :update, params: { - user: { - reset_password_token: @token, - password: "mot de passe super secret", - password_confirmation: "mot de passe super secret" + expect do + put :update, params: { + user: { + reset_password_token: @token, + password: "mot de passe super secret", + password_confirmation: "mot de passe super secret" + } } - } - - expect(user.reload.email_verified_at).to be_present + end.to change { user.reload.email_verified_at } + .from(nil).to(anything) end end end