Sha256: 5e5a7dbc2e8d470eb3d069f27a746ada261bfa5c61b5cb36331dba771a96ac74

Contents?: true

Size: 858 Bytes

Versions: 12

Compression:

Stored size: 858 Bytes

Contents

# frozen_string_literal: true

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

12 entries across 12 versions & 1 rubygems

Version Path
solidus_auth_devise-2.5.9 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.8 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.7 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.6 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.5 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.4 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.3 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.2 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.1 spec/features/sign_up_spec.rb
solidus_auth_devise-2.5.0 spec/features/sign_up_spec.rb
solidus_auth_devise-2.4.0 spec/features/sign_up_spec.rb
solidus_auth_devise-2.3.0 spec/features/sign_up_spec.rb