diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 03:51:44 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 03:51:44 +0200 |
| commit | baace1fa5df46694ddd515dc3bbca59b22df8692 (patch) | |
| tree | 6a8b587ca5d6d38377fe132b02c857f1c4149231 /test/controllers/page_translations_controller_test.rb | |
| parent | ed32bc6902ab634451539770bcd910662212e01a (diff) | |
Extract flashes to i18n and stop dispatching on submit labels
Diffstat (limited to 'test/controllers/page_translations_controller_test.rb')
| -rw-r--r-- | test/controllers/page_translations_controller_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/controllers/page_translations_controller_test.rb b/test/controllers/page_translations_controller_test.rb index feaacd0e..7484a203 100644 --- a/test/controllers/page_translations_controller_test.rb +++ b/test/controllers/page_translations_controller_test.rb | |||
| @@ -55,7 +55,7 @@ class PageTranslationsControllerTest < ActionController::TestCase | |||
| 55 | 55 | ||
| 56 | delete :destroy, params: { :node_id => node.id, :translation_locale => "en" } | 56 | delete :destroy, params: { :node_id => node.id, :translation_locale => "en" } |
| 57 | 57 | ||
| 58 | assert_equal "Can't remove the only remaining translation.", flash[:error] | 58 | assert_equal I18n.t("flash.page_translations.last_translation"), flash[:error] |
| 59 | end | 59 | end |
| 60 | 60 | ||
| 61 | test "destroy is a safe no-op, not a false success, when the translation doesn't exist" do | 61 | test "destroy is a safe no-op, not a false success, when the translation doesn't exist" do |
| @@ -64,7 +64,7 @@ class PageTranslationsControllerTest < ActionController::TestCase | |||
| 64 | 64 | ||
| 65 | delete :destroy, params: { :node_id => node.id, :translation_locale => "en" } | 65 | delete :destroy, params: { :node_id => node.id, :translation_locale => "en" } |
| 66 | 66 | ||
| 67 | assert_match(/No EN translation exists/, flash[:error]) | 67 | assert_equal I18n.t("flash.page_translations.none_to_remove", :lang => "EN"), flash[:error] |
| 68 | end | 68 | end |
| 69 | 69 | ||
| 70 | test "autosave writes the translation without creating a new revision or touching the draft" do | 70 | test "autosave writes the translation without creating a new revision or touching the draft" do |
