Module: OmniAuth::Test::StrategyMacros

Defined in:
lib/omniauth/test/strategy_macros.rb

Instance Method Summary collapse

Instance Method Details

#sets_an_auth_hashObject



4
5
6
7
8
# File 'lib/omniauth/test/strategy_macros.rb', line 4

def sets_an_auth_hash
  it 'sets an auth hash' do
    expect(last_request.env['omniauth.auth']).to be_kind_of(Hash)
  end
end

#sets_provider_to(provider) ⇒ Object



10
11
12
13
14
# File 'lib/omniauth/test/strategy_macros.rb', line 10

def sets_provider_to(provider)
  it "sets the provider to #{provider}" do
    expect((last_request.env['omniauth.auth'] || {})['provider']).to eq provider
  end
end

#sets_uid_to(uid) ⇒ Object



16
17
18
19
20
# File 'lib/omniauth/test/strategy_macros.rb', line 16

def sets_uid_to(uid)
  it "sets the UID to #{uid}" do
    expect((last_request.env['omniauth.auth'] || {})['uid']).to eq uid
  end
end

#sets_user_info_to(user_info) ⇒ Object



22
23
24
25
26
# File 'lib/omniauth/test/strategy_macros.rb', line 22

def ()
  it "sets the user_info to #{user_info}" do
    expect((last_request.env['omniauth.auth'] || {})['user_info']).to eq 
  end
end