spree_paypal_express/spec/support/authentication_helpers.rb

14 lines
272 B
Ruby

module AuthenticationHelpers
def sign_in_as!(user)
visit '/login'
fill_in 'Email', :with => user.email
fill_in 'Password', :with => 'secret'
click_button 'Login'
end
end
RSpec.configure do |c|
c.include AuthenticationHelpers, :type => :request
end