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