Browse Source

Reset email specs

pull/81/head
Matthew Phelan 3 years ago
parent
commit
cf000c76d5
  1. 12
      spec/requests/users/passwords_controller_spec.rb

12
spec/requests/users/passwords_controller_spec.rb

@ -30,10 +30,18 @@ RSpec.describe Users::PasswordsController, type: :request do
expect(response.body).to match(/Check your email/) expect(response.body).to match(/Check your email/)
end end
it "shows a flash banner" do
end
context "when a password reset is requested the email" do
let(:user) { FactoryBot.create(:user) }
let(:email) { user.email }
it "should contain the correct email" do
post "/users/password", params: params post "/users/password", params: params
follow_redirect! follow_redirect!
expect(flash[:notice]).to be_present binding.pry
expect ( ActionMailer::Base.deliveries.last.body.raw_source ).to contain( email )
end end
end end
end end

Loading…
Cancel
Save