mirror of
https://github.com/omniauth/omniauth.git
synced 2022-11-09 12:31:49 -05:00
Redundant merge
This commit is contained in:
parent
43577d3c6d
commit
518e9b6a07
2 changed files with 9 additions and 17 deletions
|
|
@ -50,7 +50,7 @@ describe OmniAuth::FailureEndpoint do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'includes the origin (escaped) if one is provided' do
|
it 'includes the origin (escaped) if one is provided' do
|
||||||
env.merge! 'omniauth.origin' => '/origin-example'
|
env['omniauth.origin'] = '/origin-example'
|
||||||
_, head, = *subject.call(env)
|
_, head, = *subject.call(env)
|
||||||
expect(head['Location']).to be_include('&origin=%2Forigin-example')
|
expect(head['Location']).to be_include('&origin=%2Forigin-example')
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -550,19 +550,15 @@ describe OmniAuth::Strategy do
|
||||||
|
|
||||||
context 'in request phase' do
|
context 'in request phase' do
|
||||||
it 'does not affect original options' do
|
it 'does not affect original options' do
|
||||||
@options.merge!(
|
@options[:test_option] = true
|
||||||
:test_option => true,
|
@options[:mutate_on_request] = proc { |options| options.delete(:test_option) }
|
||||||
:mutate_on_request => proc { |options| options.delete(:test_option) }
|
|
||||||
)
|
|
||||||
expect { strategy.call(make_env) }.to raise_error('Request Phase')
|
expect { strategy.call(make_env) }.to raise_error('Request Phase')
|
||||||
expect(strategy.options).to have_key(:test_option)
|
expect(strategy.options).to have_key(:test_option)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not affect deep options' do
|
it 'does not affect deep options' do
|
||||||
@options.merge!(
|
@options[:deep_option] = {:test_option => true}
|
||||||
:deep_option => {:test_option => true},
|
@options[:mutate_on_request] = proc { |options| options[:deep_option].delete(:test_option) }
|
||||||
:mutate_on_request => proc { |options| options[:deep_option].delete(:test_option) }
|
|
||||||
)
|
|
||||||
expect { strategy.call(make_env) }.to raise_error('Request Phase')
|
expect { strategy.call(make_env) }.to raise_error('Request Phase')
|
||||||
expect(strategy.options[:deep_option]).to have_key(:test_option)
|
expect(strategy.options[:deep_option]).to have_key(:test_option)
|
||||||
end
|
end
|
||||||
|
|
@ -570,19 +566,15 @@ describe OmniAuth::Strategy do
|
||||||
|
|
||||||
context 'in callback phase' do
|
context 'in callback phase' do
|
||||||
it 'does not affect original options' do
|
it 'does not affect original options' do
|
||||||
@options.merge!(
|
@options[:test_option] = true
|
||||||
:test_option => true,
|
@options[:mutate_on_callback] = proc { |options| options.delete(:test_option) }
|
||||||
:mutate_on_callback => proc { |options| options.delete(:test_option) }
|
|
||||||
)
|
|
||||||
expect { strategy.call(make_env('/auth/test/callback', 'REQUEST_METHOD' => 'POST')) }.to raise_error('Callback Phase')
|
expect { strategy.call(make_env('/auth/test/callback', 'REQUEST_METHOD' => 'POST')) }.to raise_error('Callback Phase')
|
||||||
expect(strategy.options).to have_key(:test_option)
|
expect(strategy.options).to have_key(:test_option)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not affect deep options' do
|
it 'does not affect deep options' do
|
||||||
@options.merge!(
|
@options[:deep_option] = {:test_option => true}
|
||||||
:deep_option => {:test_option => true},
|
@options[:mutate_on_callback] = proc { |options| options[:deep_option].delete(:test_option) }
|
||||||
:mutate_on_callback => proc { |options| options[:deep_option].delete(:test_option) }
|
|
||||||
)
|
|
||||||
expect { strategy.call(make_env('/auth/test/callback', 'REQUEST_METHOD' => 'POST')) }.to raise_error('Callback Phase')
|
expect { strategy.call(make_env('/auth/test/callback', 'REQUEST_METHOD' => 'POST')) }.to raise_error('Callback Phase')
|
||||||
expect(strategy.options[:deep_option]).to have_key(:test_option)
|
expect(strategy.options[:deep_option]).to have_key(:test_option)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue