omniauth-facebook 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of omniauth-facebook might be problematic. Click here for more details.
- data/Rakefile +5 -3
- data/example/Gemfile.lock +14 -9
- data/lib/omniauth/facebook/version.rb +1 -1
- data/lib/omniauth/strategies/facebook.rb +9 -1
- data/omniauth-facebook.gemspec +3 -2
- data/test/helper.rb +54 -0
- data/test/support/shared_examples.rb +85 -0
- data/test/test.rb +494 -0
- metadata +38 -17
- data/spec/omniauth/strategies/facebook_spec.rb +0 -507
- data/spec/spec_helper.rb +0 -6
- data/spec/support/shared_examples.rb +0 -42
data/spec/spec_helper.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# NOTE it would be useful if this lived in omniauth-oauth2 eventually
|
2
|
-
shared_examples 'an oauth2 strategy' do
|
3
|
-
describe '#client' do
|
4
|
-
it 'should be initialized with symbolized client_options' do
|
5
|
-
@options = { :client_options => { 'authorize_url' => 'https://example.com' } }
|
6
|
-
subject.client.options[:authorize_url].should == 'https://example.com'
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
describe '#authorize_params' do
|
11
|
-
it 'should include any authorize params passed in the :authorize_params option' do
|
12
|
-
@options = { :authorize_params => { :foo => 'bar', :baz => 'zip' } }
|
13
|
-
subject.authorize_params['foo'].should eq('bar')
|
14
|
-
subject.authorize_params['baz'].should eq('zip')
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'should include top-level options that are marked as :authorize_options' do
|
18
|
-
@options = { :authorize_options => [:scope, :foo], :scope => 'bar', :foo => 'baz' }
|
19
|
-
subject.authorize_params['scope'].should eq('bar')
|
20
|
-
subject.authorize_params['foo'].should eq('baz')
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'should exclude top-level options that are not passed' do
|
24
|
-
@options = { :authorize_options => [:bar] }
|
25
|
-
subject.authorize_params.should_not have_keys(:bar, 'bar')
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
describe '#token_params' do
|
30
|
-
it 'should include any authorize params passed in the :authorize_params option' do
|
31
|
-
@options = { :token_params => { :foo => 'bar', :baz => 'zip' } }
|
32
|
-
subject.token_params['foo'].should eq('bar')
|
33
|
-
subject.token_params['baz'].should eq('zip')
|
34
|
-
end
|
35
|
-
|
36
|
-
it 'should include top-level options that are marked as :authorize_options' do
|
37
|
-
@options = { :token_options => [:scope, :foo], :scope => 'bar', :foo => 'baz' }
|
38
|
-
subject.token_params['scope'].should eq('bar')
|
39
|
-
subject.token_params['foo'].should eq('baz')
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|