Sha256: 00ce85b93d23c238ec89ac71a47addccfcbcc261d1cbbbcc43b28a40a99d2871

Contents?: true

Size: 401 Bytes

Versions: 4

Compression:

Stored size: 401 Bytes

Contents

module IntegrationHelpers

  def login_user(user = nil, options = {})
    options[:password] ||= 'secret'
    user ||= create(:user, password: options[:password])

    visit spree.root_path
    click_link 'Login'
    fill_in 'spree_user[email]', with: user.email
    fill_in 'spree_user[password]', with: options[:password]
    click_button 'Login'
    page.should_not have_content 'Login'
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_drop_ship-3.1.3 spec/support/integration_helpers.rb
spree_drop_ship-3.1.2 spec/support/integration_helpers.rb
spree_drop_ship-3.1.1 spec/support/integration_helpers.rb
spree_drop_ship-3.1.0.1 spec/support/integration_helpers.rb