summaryrefslogtreecommitdiff
path: root/test/controllers/nodes_controller_test.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-10 18:10:57 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-10 18:10:57 +0200
commit48eed5f35ea798c91f1e0a77c13e751145acfc48 (patch)
tree83fa8ebf52313eedfd4b22bf4af74bf0b1a0f703 /test/controllers/nodes_controller_test.rb
parentc9401e45433ea45b46f9a8faf1e7e537e4683244 (diff)
Add the missing assertions two tests were silently running without
Both ran real code and checked nothing -- Minitest's "missing assertions" warning has been firing on every run this session. test_find_or_create_draft_if_draft_exists_and_is_owned_by_user called the method twice but never checked what came back; now confirms the second call returns the same draft rather than creating a new one, and leaves the lock and page count untouched. test_destroy_a_published_node destroyed a node and loaded the admin index but never checked the response, unlike its two neighbors covering the same destroy path (dangling pages, orphaned occurrences). Added the assert_response :success its own shape already implied. No behavior changed -- both were passing before for the same reason they're passing now, they just weren't proving anything.
Diffstat (limited to 'test/controllers/nodes_controller_test.rb')
-rw-r--r--test/controllers/nodes_controller_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/controllers/nodes_controller_test.rb b/test/controllers/nodes_controller_test.rb
index ce3419c..37091d5 100644
--- a/test/controllers/nodes_controller_test.rb
+++ b/test/controllers/nodes_controller_test.rb
@@ -355,6 +355,7 @@ class NodesControllerTest < ActionController::TestCase
355 355
356 login_as :quentin 356 login_as :quentin
357 get :index 357 get :index
358 assert_response :success
358 end 359 end
359 360
360 test "no dangling pages remain after node removal" do 361 test "no dangling pages remain after node removal" do