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