From 9041de808b9c8eae2242a42679e0b364badaadad Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 2 Jul 2025 02:45:17 +0300 Subject: [PATCH] Add test for set_locale fix in notes controller Tests the fix in c266f3c90a154dcb43ab0ff2b2e4337c510707d8. --- test/controllers/notes_controller_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/controllers/notes_controller_test.rb b/test/controllers/notes_controller_test.rb index b672a3a3e..ca8be0470 100644 --- a/test/controllers/notes_controller_test.rb +++ b/test/controllers/notes_controller_test.rb @@ -92,6 +92,15 @@ class NotesControllerTest < ActionDispatch::IntegrationTest end end + def test_index_user_not_found_language + get user_notes_path("no_such_user"), :headers => { "Accept-Language" => "fr" } + + assert_response :not_found + assert_dom "html" do + assert_dom "> @lang", "fr" + end + end + def test_empty_page user = create(:user) get user_notes_path(user) -- 2.39.5