Sha256: 4a81cae3133d94684e1273cf1417b800dfba820247f0d2aaeb92bcf8b56d2aa9
Contents?: true
Size: 1.2 KB
Versions: 12
Compression:
Stored size: 1.2 KB
Contents
# frozen_string_literal: true RSpec.feature 'Reset Password', type: :feature do let!(:store) { create(:store) } background do ActionMailer::Base.default_url_options[:host] = 'http://example.com' end context 'when an account with this email address exists' do let!(:user) { create(:user, email: 'foobar@example.com', password: 'secret', password_confirmation: 'secret') } scenario 'allows a user to supply an email for the password reset' do visit spree.login_path click_link 'Forgot Password?' fill_in_email click_button 'Reset my password' expect(page).to have_text 'you will receive an email with instructions' end end # Test that we are extending the functionality from # https://github.com/solidusio/solidus_auth_devise/pull/155 # to the non-admin login scenario 'does not reveal email addresses if they are not found' do visit spree.login_path click_link 'Forgot Password?' fill_in_email click_button 'Reset my password' expect(page).to_not have_text "Email not found" expect(page).to have_text 'you will receive an email with instructions' end def fill_in_email fill_in 'Email', with: 'foobar@example.com' end end
Version data entries
12 entries across 12 versions & 1 rubygems