From d90ba22e5eb5a7884235d062a7d1bb4f2a6bb04f Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 18 Jul 2026 03:42:22 +0200 Subject: Keep the Trash out of the drafts surfaces --- test/models/node_trash_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/models/node_trash_test.rb b/test/models/node_trash_test.rb index 07e5bc6..52069d7 100644 --- a/test/models/node_trash_test.rb +++ b/test/models/node_trash_test.rb @@ -155,4 +155,14 @@ class NodeTrashTest < ActiveSupport::TestCase assert_equal Node.root, node.reload.suggested_restore_parent end + + test "trashed nodes and the Trash itself stay out of the drafts surfaces" do + Node.trash + node = create_node_with_published_page + node.trash!(@user1) + + ids = Node.drafts_and_autosaves.pluck(:id) + assert_not_includes ids, Node.trash.id + assert_not_includes ids, node.id + end end -- cgit v1.3