]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/site_controller_test.rb
Test fetching the iD frame when not logged in
[rails.git] / test / controllers / site_controller_test.rb
index 6f6e7dcfa886c9af85a713029d104a51437c6f60..ccd8ba254bff22180644862ed5a73bedefa27972 100644 (file)
@@ -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