Sha256: fe83f026360759ceef9a3296c151e3a174721eb5c3e4ee8537ca11a442d9948a

Contents?: true

Size: 769 Bytes

Versions: 4

Compression:

Stored size: 769 Bytes

Contents

require 'spec_helper'

RSpec.feature 'Confirmation', type: :feature, reload_user: true do
  before do
    set_confirmable_option(true)
    Spree::UserMailer.stub(:confirmation_instructions).and_return(double(deliver: true))
  end

  after(:each) { set_confirmable_option(false) }

  background do
    ActionMailer::Base.default_url_options[:host] = 'http://example.com'
  end

  scenario 'create a new user' do
    visit spree.signup_path

    fill_in 'Email', with: 'email@person.com'
    fill_in 'Password', with: 'password'
    fill_in 'Password Confirmation', with: 'password'
    click_button 'Sign Up'

    expect(page).to have_text I18n.t('devise.user_registrations.signed_up_but_unconfirmed')
    expect(Spree.user_class.last.confirmed?).to be(false)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_auth_devise-4.1.1 spec/features/confirmation_spec.rb
spree_auth_devise-4.2.1 spec/features/confirmation_spec.rb
spree_auth_devise-4.2.0 spec/features/confirmation_spec.rb
spree_auth_devise-4.1.0 spec/features/confirmation_spec.rb