diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-14 02:17:04 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-14 02:17:04 +0200 |
| commit | 88ebeaac7fcf140cbab489e841bf9c197f84c4ea (patch) | |
| tree | ff97b50deebdaa44eb6a40d8550e912457c2fb8f /test/controllers/page_translations_controller_test.rb | |
| parent | c693069db6ddce4582209a1cf60a564f6947bd56 (diff) | |
Make revisions locale aware
Diffstat (limited to 'test/controllers/page_translations_controller_test.rb')
| -rw-r--r-- | test/controllers/page_translations_controller_test.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/test/controllers/page_translations_controller_test.rb b/test/controllers/page_translations_controller_test.rb index 8c899fd..8fa732f 100644 --- a/test/controllers/page_translations_controller_test.rb +++ b/test/controllers/page_translations_controller_test.rb | |||
| @@ -1,18 +1,6 @@ | |||
| 1 | require 'test_helper' | 1 | require 'test_helper' |
| 2 | 2 | ||
| 3 | class PageTranslationsControllerTest < ActionController::TestCase | 3 | class PageTranslationsControllerTest < ActionController::TestCase |
| 4 | test "index lists the default locale's existing translation and flags a missing one" do | ||
| 5 | login_as :quentin | ||
| 6 | node = Node.root.children.create!(:slug => "translations_index_test") | ||
| 7 | node.publish_draft! | ||
| 8 | |||
| 9 | get :index, params: { :node_id => node.id } | ||
| 10 | |||
| 11 | assert_response :success | ||
| 12 | assert_equal [:en], assigns(:translations).map { |t| t[:locale] } | ||
| 13 | assert_equal false, assigns(:translations).first[:exists] | ||
| 14 | end | ||
| 15 | |||
| 16 | test "update creates a first-time translation on a fresh draft, leaving head untouched" do | 4 | test "update creates a first-time translation on a fresh draft, leaving head untouched" do |
| 17 | login_as :quentin | 5 | login_as :quentin |
| 18 | node = Node.root.children.create!(:slug => "translations_create_test") | 6 | node = Node.root.children.create!(:slug => "translations_create_test") |
