summaryrefslogtreecommitdiff
path: root/test/controllers/page_translations_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/controllers/page_translations_controller_test.rb')
-rw-r--r--test/controllers/page_translations_controller_test.rb12
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 @@
1require 'test_helper' 1require 'test_helper'
2 2
3class PageTranslationsControllerTest < ActionController::TestCase 3class 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")