Works great for me, but the cucumber test fails. I get “Password can't be blank” messages. I guess it is related with using “:without_protection => true” while creating new User.
step_definitions/user_steps.rb
defset_facebook_omniauth
credentials = {:provider => :facebook, :uuid => '65', :info => {:email => 'machete@yourgarganta.mx', :name => 'Denny Trejo'}}
OmniAuth.config.test_mode = trueOmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({'uid' => credentials[:uuid], 'info' => {'email' => credentials[:info][:email], 'name' => credentials[:info][:name]}})
endWhen/^I login with Facebook$/do
set_facebook_omniauth
visit root_path
click_link 'Login with Facebook'endThen/^I see a successful sign in message$/do
page.should have_content "Signed in successfully."end
As I’m using mongoid I’ve changed a bit “from_omniauth” method.
Thanks! It works now!
Works great for me, but the cucumber test fails. I get “Password can't be blank” messages. I guess it is related with using “:without_protection => true” while creating new User.
As I’m using mongoid I’ve changed a bit “from_omniauth” method.