summaryrefslogtreecommitdiff
path: root/test/controllers/nodes_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/controllers/nodes_controller_test.rb')
-rw-r--r--test/controllers/nodes_controller_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/controllers/nodes_controller_test.rb b/test/controllers/nodes_controller_test.rb
index 37091d5..b563d4d 100644
--- a/test/controllers/nodes_controller_test.rb
+++ b/test/controllers/nodes_controller_test.rb
@@ -463,4 +463,12 @@ class NodesControllerTest < ActionController::TestCase
463 put :revert, params: { :id => node.id } 463 put :revert, params: { :id => node.id }
464 assert_redirected_to edit_node_path(node) 464 assert_redirected_to edit_node_path(node)
465 end 465 end
466
467 test "nodes#show does not offer to destroy the only draft of a never-published node" do
468 node = Node.root.children.create!(:slug => "draft_only_test")
469 login_as :quentin
470 get :show, params: { :id => node.id }
471 assert_response :success
472 assert_select "form.destructive", :count => 0
473 end
466end 474end