Sha256: 77718bfa24031284f5db1ecb723d23a91bcb73e450440d77bec22b51b860e9aa
Contents?: true
Size: 618 Bytes
Versions: 1
Compression:
Stored size: 618 Bytes
Contents
module G5Authenticatable module Test module RequestHelpers include Warden::Test::Helpers def login_user(user) login_as(user, scope: :user) end def logout_user logout :user end end end end shared_context 'auth request', auth_request: true do include G5Authenticatable::Test::RequestHelpers let(:user) { FactoryGirl.create(:g5_authenticatable_user) } before { login_user(user) } after { logout_user } end RSpec.configure do |config| config.include G5Authenticatable::Test::RequestHelpers, type: :request config.after { Warden.test_reset! } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
g5_authenticatable-0.3.0 | lib/g5_authenticatable/test/request_helpers.rb |