Sha256: 51a681eeb74bdd97484a2998ad298cf384957b9383395ba7df421a75828b63dd

Contents?: true

Size: 395 Bytes

Versions: 13

Compression:

Stored size: 395 Bytes

Contents

def sign_in_admin!(user)
  visit '/admin'
  fill_in 'Email', :with => user.email
  fill_in 'Password', :with => user.password
  click_button 'Login'
end

def create_admin_in_sign_in
  @admin = Spree.user_class.create(email: 'admin@admin.com', password: 'password', password_confirmation: 'password')
  @role = Spree::Role.create(name: 'admin')
  @role.users << @admin
  sign_in_admin! @admin
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
spree_zaez_billet-3.0.4.1 spec/support/capybara_login.rb
spree_zaez_billet-3.0.4 spec/support/capybara_login.rb
spree_zaez_clearsale-3.0.3 spec/support/capybara_login.rb
spree_zaez_banner-3.0.4 spec/support/capybara_login.rb
spree_zaez_clearsale-3.0.2 spec/support/capybara_login.rb
spree_zaez_billet-3.0.3 spec/support/capybara_login.rb
spree_zaez_banner-3.0.3 spec/support/capybara_login.rb
spree_zaez_banner-3.0.2 spec/support/capybara_login.rb
spree_zaez_banner-3.0.1 spec/support/capybara_login.rb
spree_zaez_billet-3.0.2 spec/support/capybara_login.rb
spree_zaez_banner-3.0.0 spec/support/capybara_login.rb
spree_zaez_clearsale-3.0.1 spec/support/capybara_login.rb
spree_zaez_billet-3.0.1 spec/support/capybara_login.rb