This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
forked from omniauth/omniauth-oauth2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Symbolize client options before passing them through.
- Loading branch information
Michael Bleigh
committed
Oct 1, 2011
1 parent
16040a0
commit a09b479
Showing
4 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--colour | ||
--format=progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
#!/usr/bin/env rake | ||
require "bundler/gem_tasks" | ||
require 'rspec/core/rake_task' | ||
|
||
desc 'Default: run specs.' | ||
task :default => :spec | ||
|
||
desc "Run specs" | ||
RSpec::Core::RakeTask.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
describe OmniAuth::Strategies::OAuth2 do | ||
def app; lambda{|env| [200, {}, ["Hello."]]} end | ||
let(:fresh_strategy){ Class.new(OmniAuth::Strategies::OAuth2) } | ||
|
||
describe '#client' do | ||
subject{ fresh_strategy } | ||
|
||
it 'should be initialized with symbolized client_options' do | ||
instance = subject.new(app, :client_options => {'authorize_url' => 'https://example.com'}) | ||
instance.client.options[:authorize_url].should == 'https://example.com' | ||
end | ||
end | ||
end |