]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/site_controller_test.rb
Facelift offline.html and use Bootstrap classes for "notifications"
[rails.git] / test / controllers / site_controller_test.rb
index 2d47e7de70a650fa8f0e74846c1e7317d0a95696..73e1b4729430930c3a50fc9e78a1ceba98caf170 100644 (file)
@@ -98,7 +98,7 @@ class SiteControllerTest < ActionDispatch::IntegrationTest
     assert_redirected_to :controller => :browse, :action => :relation, :id => 123
 
     get root_path(:note => 123)
-    assert_redirected_to :controller => :browse, :action => :note, :id => 123
+    assert_redirected_to :controller => :notes, :action => :show, :id => 123
 
     get root_path(:query => "test")
     assert_redirected_to :controller => :geocoder, :action => :search, :query => "test"
@@ -495,7 +495,7 @@ class SiteControllerTest < ActionDispatch::IntegrationTest
   def test_offline
     get offline_path
     assert_response :success
-    assert_template "offline"
+    assert_select ".alert-warning"
   end
 
   # Test the rich text preview
@@ -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