Created
June 23, 2011 21:43
-
-
Save deathbob/1043708 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| require 'spec_helper' | |
| describe Users::OmniauthCallbacksController do | |
| include Devise::TestHelpers | |
| before :each do | |
| @user = Factory.create(:user) | |
| request.env["devise.mapping"] = Devise.mappings[:user] | |
| end | |
| describe 'auth from facebook' do | |
| describe 'with valid procedures' do | |
| it 'signs the user in' do | |
| @controller.stubs('env').returns({"omniauth.auth" => {'extra' => {"user_hash" => {"email" => @user.email}}}}) | |
| get(:facebook) | |
| response.should be_redirect | |
| response.should redirect_to(root_path) | |
| flash[:notice].should =~ /Successfully/ | |
| end | |
| end | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment