summaryrefslogtreecommitdiff
path: root/test/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'test/controllers')
-rw-r--r--test/controllers/page_translations_controller_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/controllers/page_translations_controller_test.rb b/test/controllers/page_translations_controller_test.rb
index 8fa732f..82f8bce 100644
--- a/test/controllers/page_translations_controller_test.rb
+++ b/test/controllers/page_translations_controller_test.rb
@@ -82,4 +82,19 @@ class PageTranslationsControllerTest < ActionController::TestCase
82 assert_equal page_count_before, node.pages.count 82 assert_equal page_count_before, node.pages.count
83 assert_equal "in progress", Globalize.with_locale(:en) { node.autosave.title } 83 assert_equal "in progress", Globalize.with_locale(:en) { node.autosave.title }
84 end 84 end
85
86 test "destroy logs a translation_destroy NodeAction" do
87 login_as :quentin
88 node = Node.root.children.create!(:slug => "translation_destroy_log_test")
89 Globalize.with_locale(:en) { node.draft.update!(:title => "English title") }
90
91 delete :destroy, params: { :node_id => node.id, :translation_locale => "en" }
92
93 action = NodeAction.last
94 assert_equal node, action.node
95 assert_equal "en", action.locale
96 assert_equal "translation_destroy", action.action
97 assert_equal users(:quentin), action.user
98 assert_redirected_to node_path(node)
99 end
85end 100end