Sha256: 7e4fcbb93c3bc09d39578d87a5ba49a139df552f04e570bd3981677650c8a2a0

Contents?: true

Size: 828 Bytes

Versions: 27

Compression:

Stored size: 828 Bytes

Contents

RSpec.feature 'Sign Up', type: :feature do

  context 'with valid data' do
    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 'Create'

      expect(page).to have_text 'You have signed up successfully.'
      expect(Spree::User.count).to eq(1)
    end
  end

  context 'with invalid data' do
    scenario 'does not 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: ''
      click_button 'Create'

      expect(page).to have_css '#errorExplanation'
      expect(Spree::User.count).to eq(0)
    end
  end
end

Version data entries

27 entries across 27 versions & 3 rubygems

Version Path
solidus_auth_devise-1.3.0 spec/features/sign_up_spec.rb
solidus_auth_devise-1.2.3 spec/features/sign_up_spec.rb
solidus_auth_devise-1.2.2 spec/features/sign_up_spec.rb
solidus_auth_devise-1.2.1 spec/features/sign_up_spec.rb
solidus_auth_devise-1.2.0 spec/features/sign_up_spec.rb
solidus_auth_devise-1.1.0 spec/features/sign_up_spec.rb
solidus_auth_devise-1.0.0 spec/features/sign_up_spec.rb