Module: OmniAuth::Test::StrategyMacros
- Defined in:
- lib/omniauth/test/strategy_macros.rb
Instance Method Summary collapse
- #sets_an_auth_hash ⇒ Object
- #sets_provider_to(provider) ⇒ Object
- #sets_uid_to(uid) ⇒ Object
- #sets_user_info_to(user_info) ⇒ Object
Instance Method Details
#sets_an_auth_hash ⇒ Object
7 8 9 10 11 |
# File 'lib/omniauth/test/strategy_macros.rb', line 7 def sets_an_auth_hash it 'should set an auth hash' do last_request.env['omniauth.auth'].should be_kind_of(Hash) end end |
#sets_provider_to(provider) ⇒ Object
13 14 15 16 17 |
# File 'lib/omniauth/test/strategy_macros.rb', line 13 def sets_provider_to(provider) it "should set the provider to #{provider}" do (last_request.env['omniauth.auth'] || {})['provider'].should == provider end end |
#sets_uid_to(uid) ⇒ Object
19 20 21 22 23 |
# File 'lib/omniauth/test/strategy_macros.rb', line 19 def sets_uid_to(uid) it "should set the UID to #{uid}" do (last_request.env['omniauth.auth'] || {})['uid'].should == uid end end |
#sets_user_info_to(user_info) ⇒ Object
25 26 27 28 29 |
# File 'lib/omniauth/test/strategy_macros.rb', line 25 def sets_user_info_to(user_info) it "should set the user_info to #{user_info}" do (last_request.env['omniauth.auth'] || {})['user_info'].should == user_info end end |