wikicr/spec/flows/reset_password_spec.cr
Arthur Poulet e9bb1cbdc0
Some checks failed
continuous-integration/drone/push Build is failing
spike: try to install & migrate to lucky
2021-10-15 18:44:23 +02:00

19 lines
443 B
Crystal

require "../spec_helper"
describe "Reset password flow" do
it "works" do
user = UserFactory.create
flow = ResetPasswordFlow.new(user)
flow.request_password_reset
flow.should_have_sent_reset_email
flow.reset_password "new-password"
flow.should_be_signed_in
flow.sign_out
flow.sign_in "wrong-password"
flow.should_have_password_error
flow.sign_in "new-password"
flow.should_be_signed_in
end
end