summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-03-21 17:39:11 +0100
committerhukl <contact@smyck.org>2009-03-21 17:39:11 +0100
commit0e215fab6ef01cfe4865ed10bbe083f800c9a73e (patch)
tree12b49dc4f5d12d5786f247c581624785bf90d38f /test/unit
parent40bdc8384a33019c1771fbad888525505f61aa7c (diff)
put the lock onto nodes
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/node_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb
index 2558ca3..a7405f0 100644
--- a/test/unit/node_test.rb
+++ b/test/unit/node_test.rb
@@ -30,7 +30,7 @@ class NodeTest < ActiveSupport::TestCase
30 assert_not_nil @first_child.draft 30 assert_not_nil @first_child.draft
31 assert_nil @first_child.draft.user 31 assert_nil @first_child.draft.user
32 @first_child.find_or_create_draft @user1 32 @first_child.find_or_create_draft @user1
33 assert_equal @user1, @first_child.draft.user 33 assert_equal @user1, @first_child.user
34 end 34 end
35 35
36 def test_unique_path_returns_an_array 36 def test_unique_path_returns_an_array
@@ -121,9 +121,8 @@ class NodeTest < ActiveSupport::TestCase
121 node = Node.create :slug => "third_child" 121 node = Node.create :slug => "third_child"
122 node.move_to_child_of @root 122 node.move_to_child_of @root
123 node.publish_draft! 123 node.publish_draft!
124
125 node.find_or_create_draft @user1 124 node.find_or_create_draft @user1
126 125 assert_equal @user1, node.user
127 assert_raise(RuntimeError) do 126 assert_raise(RuntimeError) do
128 node.find_or_create_draft @user2 127 node.find_or_create_draft @user2
129 end 128 end