Sha256: 284f96da8c338c7e8b72a4690dda473f39ad6a831bfec5f75bf12d80023e57bb

Contents?: true

Size: 396 Bytes

Versions: 10

Compression:

Stored size: 396 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_and_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

10 entries across 10 versions & 1 rubygems

Version Path
spree_zaez_cielo-3.0.10 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.9 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.8 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.7 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.6 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.5 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.4 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.3 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.2 spec/support/capybara_login.rb
spree_zaez_cielo-3.0.1 spec/support/capybara_login.rb