Sha256: 1ec8d1114b8e0997d730483080b35f817abaa57adf71567fbd017018c1769d38

Contents?: true

Size: 831 Bytes

Versions: 1

Compression:

Stored size: 831 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 'Sign Up'

      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 'Sign Up'

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_auth_devise-4.1.0.rc1 spec/features/sign_up_spec.rb