end
def test_user_create_facebook_success
- OmniAuth.config.add_mock(:facebook, :uid => "123454321", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/new.tester" }
- })
+ OmniAuth.config.add_mock(:facebook, :uid => "123454321")
new_email = "newtester-facebook@osm.org"
display_name = "new_tester-facebook"
end
def test_user_create_facebook_redirect
- OmniAuth.config.add_mock(:facebook, :uid => "123454321", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/new.tester" }
- })
+ OmniAuth.config.add_mock(:facebook, :uid => "123454321")
new_email = "redirect_tester_facebook@osm.org"
display_name = "redirect_tester_facebook"
end
def test_user_create_windowslive_success
- OmniAuth.config.add_mock(:windowslive, :uid => "123454321", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/new.tester" }
- })
+ OmniAuth.config.add_mock(:windowslive, :uid => "123454321")
new_email = "newtester-windowslive@osm.org"
display_name = "new_tester-windowslive"
end
def test_user_create_windowslive_redirect
- OmniAuth.config.add_mock(:windowslive, :uid => "123454321", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/new.tester" }
- })
+ OmniAuth.config.add_mock(:windowslive, :uid => "123454321")
new_email = "redirect_tester_windowslive@osm.org"
display_name = "redirect_tester_windowslive"
end
def test_login_facebook_success
- OmniAuth.config.add_mock(:facebook, :uid => "123456789", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/fred.bloggs" }
- })
+ OmniAuth.config.add_mock(:facebook, :uid => "123456789")
get "/login", :referer => "/history"
assert_response :redirect
end
def test_login_facebook_unknown
- OmniAuth.config.add_mock(:facebook, :uid => "987654321", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/fred.bloggs" }
- })
+ OmniAuth.config.add_mock(:facebook, :uid => "987654321")
get "/login", :referer => "/history"
assert_response :redirect
end
def test_login_windowslive_success
- OmniAuth.config.add_mock(:windowslive, :uid => "123456789", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/fred.bloggs" }
- })
+ OmniAuth.config.add_mock(:windowslive, :uid => "123456789")
get "/login", :referer => "/history"
assert_response :redirect
end
def test_login_windowslive_unknown
- OmniAuth.config.add_mock(:windowslive, :uid => "987654321", :extra => {
- :id_info => { "openid_id" => "http://localhost:1123/fred.bloggs" }
- })
+ OmniAuth.config.add_mock(:windowslive, :uid => "987654321")
get "/login", :referer => "/history"
assert_response :redirect