summaryrefslogtreecommitdiff
path: root/test/models/node_trash_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/models/node_trash_test.rb')
-rw-r--r--test/models/node_trash_test.rb10
1 files changed, 10 insertions, 0 deletions
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
155 155
156 assert_equal Node.root, node.reload.suggested_restore_parent 156 assert_equal Node.root, node.reload.suggested_restore_parent
157 end 157 end
158
159 test "trashed nodes and the Trash itself stay out of the drafts surfaces" do
160 Node.trash
161 node = create_node_with_published_page
162 node.trash!(@user1)
163
164 ids = Node.drafts_and_autosaves.pluck(:id)
165 assert_not_includes ids, Node.trash.id
166 assert_not_includes ids, node.id
167 end
158end 168end