Sha256: 9968dbf01ad2f9d1bf80d4747ae2153690ba31b348a129c9c97bcd4958d14af7

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

require 'spec_helper'

feature 'Confirmation' do
  before do
    set_confirmable_option(false)
    allow(Spree::UserMailer).to receive(:confirmation_instructions)
      .and_return(double(deliver: true))
  end

  let!(:store) { create(:store) }

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

  scenario 'create a new user', :js 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 'Create'

    expect(page).to have_text 'You have signed up successfully.'
    expect(Spree::User.last.confirmed?).to be(false)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_auth_devise-2.2.0 spec/features/confirmation_spec.rb