Sha256: 31eba003ff852d826b449ac2b1ed5553a56a885404a153ac34a32fec5c479a30
Contents?: true
Size: 666 Bytes
Versions: 1
Compression:
Stored size: 666 Bytes
Contents
module AuthMacros def log_in(role, attributes = {}) @_current_user = FactoryGirl.create(:cavy_user, role: role) visit admin_signin_path(locale: :en) fill_in 'user-email', with: @_current_user.email fill_in 'user-password', with: @_current_user.password click_button 'sign-in' end def log_in_rack(role, attributes={}) @user = FactoryGirl.create(:cavy_user, password: 'secret', password_confirmation: 'secret') @session = {email: @user.email, password: 'secret'} post admin_create_session_path(locale: :en), params: @session end def log_out Capybara.reset_sessions! end def current_user @_current_user end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cavy-0.1.0.beta1 | spec/support/auth_macros.rb |