Created
March 3, 2011 18:41
-
-
Save mikegehard/853253 to your computer and use it in GitHub Desktop.
Testing OmniAuth login via cucumber...
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
Before('@omniauth_test') do | |
OmniAuth.config.test_mode = true | |
# the symbol passed to mock_auth is the same as the name of the provider set up in the initializer | |
OmniAuth.config.mock_auth[:google] = { | |
"provider"=>"google", | |
"uid"=>"http://xxxx.com/openid?id=118181138998978630963", | |
"user_info"=>{"email"=>"[email protected]", "first_name"=>"Test", "last_name"=>"User", "name"=>"Test User"} | |
} | |
end | |
After('@omniauth_test') do | |
OmniAuth.config.test_mode = false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment