signup_spec.rb 551 B

12345678910111213141516171819
  1. require 'rails_helper'
  2. RSpec.describe 'Signup', type: :system, authenticated_as: false do
  3. it 'shows password strength error' do
  4. visit 'signup'
  5. fill_in 'firstname', with: 'Test'
  6. fill_in 'lastname', with: 'Test'
  7. fill_in 'email', with: 'test@example.com'
  8. fill_in 'password', with: 'asdasdasdasd'
  9. fill_in 'password_confirm', with: 'asdasdasdasd'
  10. click '.js-submit'
  11. within '.js-danger' do
  12. expect(page).to have_text('Invalid password,').and(have_no_text('["'))
  13. end
  14. end
  15. end