X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/38ad8fbc36f1092b8b0b416e5c2c80ee7825f113..b0a741412f3ea330272c827cf4a9c577498f8de9:/test/controllers/site_controller_test.rb diff --git a/test/controllers/site_controller_test.rb b/test/controllers/site_controller_test.rb index 6f6e7dcfa..ccd8ba254 100644 --- a/test/controllers/site_controller_test.rb +++ b/test/controllers/site_controller_test.rb @@ -1,20 +1,6 @@ require "test_helper" class SiteControllerTest < ActionDispatch::IntegrationTest - ## - # setup oauth keys - def setup - super - - Settings.id_key = create(:client_application).key - end - - ## - # clear oauth keys - def teardown - Settings.id_key = nil - end - ## # test all routes which lead to this controller def test_routes @@ -534,4 +520,12 @@ class SiteControllerTest < ActionDispatch::IntegrationTest assert_template "id" assert_template :layout => false end + + # Test the id frame when not logged in + def test_id_without_login + get id_path + + assert_response :redirect + assert_redirected_to login_path(:referer => "/id") + end end