1
0
Fork 0
mirror of https://github.com/omniauth/omniauth.git synced 2022-11-09 12:31:49 -05:00
omniauth--omniauth/lib/omniauth/test/strategy_macros.rb

35 lines
799 B
Ruby
Raw Normal View History

2011-09-03 14:08:07 -04:00
module OmniAuth
module Test
module StrategyMacros
def sets_an_auth_hash
it "sets an auth hash" do
expect(last_request.env['omniauth.auth']).to be_kind_of(Hash)
2011-09-03 14:08:07 -04:00
end
end
def sets_provider_to(provider)
it "sets the provider to #{provider}" do
expect((last_request.env['omniauth.auth'] || {})['provider']).to eq provider
2011-09-03 14:08:07 -04:00
end
end
def sets_uid_to(uid)
it "sets the UID to #{uid}" do
expect((last_request.env['omniauth.auth'] || {})['uid']).to eq uid
2011-09-03 14:08:07 -04:00
end
end
def sets_user_info_to(user_info)
it "sets the user_info to #{user_info}" do
expect((last_request.env['omniauth.auth'] || {})['user_info']).to eq user_info
2011-09-03 14:08:07 -04:00
end
end
end
end
end