X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a566589c1becb18ad2d12623d0ff240ea279d8e6..218b140912dd99d87c61d609da42b8507f89ccb8:/test/controllers/site_controller_test.rb?ds=sidebyside diff --git a/test/controllers/site_controller_test.rb b/test/controllers/site_controller_test.rb index 2d47e7de7..75a042bfe 100644 --- a/test/controllers/site_controller_test.rb +++ b/test/controllers/site_controller_test.rb @@ -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 @@ -520,4 +525,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