Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/AndrewO/omniauth

  • Loading branch information...
commit 1a33c3f09d0a39c4ed8f2fc7016e768869286800 2 parents 14e35fd + 5e3c5d4
Michael Bleigh authored
View
3  oa-core/lib/omniauth/strategies/password.rb
@@ -7,9 +7,8 @@ class Password
include OmniAuth::Strategy
def initialize(app, secret = 'changethisappsecret', options = {}, &block)
- @options = options
@secret = secret
- super(app, :password, &block)
+ super(app, :password, options, &block)
end
attr_reader :secret
View
5 oa-core/lib/omniauth/test/strategy_macros.rb
@@ -22,6 +22,11 @@ def sets_uid_to(uid)
end
end
+ def sets_user_info_to(user_info)
+ it "should set the user_info to #{user_info}" do
+ (last_request.env['omniauth.auth'] || {})['user_info'].should == user_info
+ end
+ end
end
end
View
1  oa-core/spec/omniauth/strategies/password_spec.rb
@@ -27,6 +27,7 @@ def strategy
end
sets_an_auth_hash
sets_provider_to 'password'
+ sets_user_info_to "username" => "jerome"
it 'should set the UID to an opaque identifier' do
uid = last_request.env['omniauth.auth']['uid']
uid.should_not be_nil
Please sign in to comment.
Something went wrong with that request. Please try again.