]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/site_controller_test.rb
Merge pull request #3907 from Dimitar5555/patch-1
[rails.git] / test / controllers / site_controller_test.rb
index ccd8ba254bff22180644862ed5a73bedefa27972..cc155155fb7673771cf6c35e6a51afd7cbbdc5d2 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"
@@ -476,6 +476,11 @@ class SiteControllerTest < ActionDispatch::IntegrationTest
     assert_response :success
     assert_template "about"
     assert_select "div[lang='ar'][dir='rtl']"
+
+    # Page should still render even with incorrect locale
+    get about_path(:about_locale => "zzz")
+    assert_response :success
+    assert_template "about"
   end
 
   # Test the export page
@@ -495,7 +500,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