]> git.openstreetmap.org Git - rails.git/commitdiff
Test fetching the iD frame when not logged in
authorTom Hughes <tom@compton.nu>
Tue, 26 Jul 2022 16:38:56 +0000 (17:38 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 26 Jul 2022 16:38:56 +0000 (17:38 +0100)
test/controllers/site_controller_test.rb

index 2d47e7de70a650fa8f0e74846c1e7317d0a95696..ccd8ba254bff22180644862ed5a73bedefa27972 100644 (file)
@@ -520,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