Sha256: 74f765c350434638bfd7e7484cb2a6ddce5bc6a043bc8edfb925c4d29270b6ad

Contents?: true

Size: 767 Bytes

Versions: 18

Compression:

Stored size: 767 Bytes

Contents

RSpec.feature 'Reset Password', type: :feature do
  background do
    ActionMailer::Base.default_url_options[:host] = 'http://example.com'
  end

  scenario 'allow a user to supply an email for the password reset' do
    user = create(:user, email: 'foobar@example.com', password: 'secret', password_confirmation: 'secret')
    visit spree.login_path
    click_link 'Forgot password?'
    fill_in 'Email', with: 'foobar@example.com'
    click_button 'Reset my password'
    expect(page).to have_text 'You will receive an email with instructions'
  end

  scenario 'shows errors if no email is supplied' do
    visit spree.login_path
    click_link 'Forgot password?'
    click_button 'Reset my password'
    expect(page).to have_text "Email can't be blank"
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
spree_auth_devise-4.6.3 spec/features/password_reset_spec.rb
spree_auth_devise-4.6.2 spec/features/password_reset_spec.rb
spree_auth_devise-4.6.1 spec/features/password_reset_spec.rb
spree_auth_devise-4.6.0 spec/features/password_reset_spec.rb
spree_auth_devise-4.5.0 spec/features/password_reset_spec.rb
spree_auth_devise-4.4.2 spec/features/password_reset_spec.rb
spree_auth_devise-4.1.1 spec/features/password_reset_spec.rb
spree_auth_devise-4.2.1 spec/features/password_reset_spec.rb
spree_auth_devise-4.4.1 spec/features/password_reset_spec.rb
spree_auth_devise-4.4.0 spec/features/password_reset_spec.rb
spree_auth_devise-4.3.4 spec/features/password_reset_spec.rb
spree_auth_devise-4.3.3 spec/features/password_reset_spec.rb
spree_auth_devise-4.3.2 spec/features/password_reset_spec.rb
spree_auth_devise-4.3.1 spec/features/password_reset_spec.rb
spree_auth_devise-4.3.0 spec/features/password_reset_spec.rb
spree_auth_devise-4.2.0 spec/features/password_reset_spec.rb
spree_auth_devise-4.1.0 spec/features/password_reset_spec.rb
spree_auth_devise-4.1.0.rc1 spec/features/password_reset_spec.rb