Skip to content

Instantly share code, notes, and snippets.

@drKreso
Created November 3, 2018 11:18
Show Gist options
  • Save drKreso/b546f35f127c79f9dfaf9b39322cd658 to your computer and use it in GitHub Desktop.
Save drKreso/b546f35f127c79f9dfaf9b39322cd658 to your computer and use it in GitHub Desktop.
module OmniauthMacros
def mock_auth_hash
OmniAuth.config.mock_auth[:default] = OmniAuth::AuthHash.new(
'provider' => 'facebook',
'uid' => '123545',
'info' => {
'name' => 'mockuser',
'image' => 'mock_user_thumbnail_url',
'first_name' => 'john',
'last_name' => 'doe',
'email' => '[email protected]',
'urls' => {
'public_profile' => 'http://test.test/public_profile'
}
},
'credentials' => {
'token' => 'mock_token',
'secret' => 'mock_secret'
},
'extra' => {
'raw_info' => '{"json":"data"}'
}
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment