Module: Features::SessionHelpers

Defined in:
lib/voyage/templates/specs/support/features/session_helpers.rb

Instance Method Summary collapse

Instance Method Details

#sign_in(email, password) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/voyage/templates/specs/support/features/session_helpers.rb', line 3

def (email, password)
  visit 
  within '.form-inputs' do
    fill_in 'user_email', with: email
    fill_in 'user_password', with: password
  end

  click_button 'Log in'
end

#sign_up_with(first, last, email, password, password_confirmation) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/voyage/templates/specs/support/features/session_helpers.rb', line 13

def (first, last, email, password, password_confirmation)
  visit new_user_registration_path
  within '.form-inputs' do
    fill_in 'First name', with: first
    fill_in 'Last name', with: last

    fill_in 'Email', with: email
    fill_in 'user_password', with: password
    fill_in 'user_password_confirmation', with: password_confirmation
  end

  click_button 'Sign up'
end