rewrite test with "expect to change" syntax
Co-authored-by: mfo <mfo@users.noreply.github.com>
This commit is contained in:
parent
9e843a3df4
commit
ced80bf23d
1 changed files with 9 additions and 10 deletions
|
@ -40,17 +40,16 @@ describe Users::PasswordsController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "marks user's email as verified" do
|
it "marks user's email as verified" do
|
||||||
expect(user.email_verified_at).to be_nil
|
expect do
|
||||||
|
put :update, params: {
|
||||||
put :update, params: {
|
user: {
|
||||||
user: {
|
reset_password_token: @token,
|
||||||
reset_password_token: @token,
|
password: "mot de passe super secret",
|
||||||
password: "mot de passe super secret",
|
password_confirmation: "mot de passe super secret"
|
||||||
password_confirmation: "mot de passe super secret"
|
}
|
||||||
}
|
}
|
||||||
}
|
end.to change { user.reload.email_verified_at }
|
||||||
|
.from(nil).to(anything)
|
||||||
expect(user.reload.email_verified_at).to be_present
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue