summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-09-09 12:34:19 +0200
committerhukl <contact@smyck.org>2009-09-09 12:34:19 +0200
commit3fb1e130b9428235e73a7b530761b9cd438d7f80 (patch)
tree5d0050e5f994701e7546b525f8ab03e89d8c7051 /test
parenta6292dd0fecd4482fe863ed849d126b5281b1a8a (diff)
uhm yeah - well it was finally time to validate the uniqueness of slugs scoped to the parent_id. Who though it wasn't there already?
Diffstat (limited to 'test')
-rw-r--r--test/unit/node_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb
index 50c2dd2..ee4d71f 100644
--- a/test/unit/node_test.rb
+++ b/test/unit/node_test.rb
@@ -98,14 +98,14 @@ class NodeTest < ActiveSupport::TestCase
98 end 98 end
99 99
100 def test_create_new_draft_of_published_page 100 def test_create_new_draft_of_published_page
101 node = Node.create :slug => "third_child" 101 node = Node.create :slug => "xyz"
102 node.move_to_child_of @root 102 node.move_to_child_of @root
103 103
104 assert node.publish_draft! 104 assert node.publish_draft!
105 end 105 end
106 106
107 def test_find_or_create_draft_if_no_draft_exists 107 def test_find_or_create_draft_if_no_draft_exists
108 node = Node.create :slug => "third_child" 108 node = Node.create :slug => "xyz"
109 node.move_to_child_of @root 109 node.move_to_child_of @root
110 node.publish_draft! 110 node.publish_draft!
111 111
@@ -113,7 +113,7 @@ class NodeTest < ActiveSupport::TestCase
113 end 113 end
114 114
115 def test_find_or_create_draft_if_draft_exists_and_is_owned_by_user 115 def test_find_or_create_draft_if_draft_exists_and_is_owned_by_user
116 node = Node.create :slug => "third_child" 116 node = Node.create :slug => "xyz"
117 node.move_to_child_of @root 117 node.move_to_child_of @root
118 node.publish_draft! 118 node.publish_draft!
119 119
@@ -122,7 +122,7 @@ class NodeTest < ActiveSupport::TestCase
122 end 122 end
123 123
124 def test_exception_if_draft_exists_but_locked_by_another_user 124 def test_exception_if_draft_exists_but_locked_by_another_user
125 node = Node.create :slug => "third_child" 125 node = Node.create :slug => "xyz"
126 node.move_to_child_of @root 126 node.move_to_child_of @root
127 node.publish_draft! 127 node.publish_draft!
128 node.find_or_create_draft @user1 128 node.find_or_create_draft @user1