Browse Source

Add test for password reset email

pull/81/head
MadeTech Dushan 3 years ago
parent
commit
12f2c95844
  1. 6
      spec/features/user_spec.rb

6
spec/features/user_spec.rb

@ -43,5 +43,11 @@ RSpec.describe "User Features" do
click_button("Send email")
expect(page).to have_current_path("/confirmations/reset?email=idontexist%40example.com")
end
it " is sent a reset password email" do
visit("/users/password/new")
fill_in("user_email", with: "test@example.com")
expect{click_button("Send email")}.to change{ActionMailer::Base.deliveries.count}.by(1)
end
end
end

Loading…
Cancel
Save