summaryrefslogtreecommitdiff
path: root/test/unit/node_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/node_test.rb')
-rw-r--r--test/unit/node_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb
index 77e9cad..dd010cd 100644
--- a/test/unit/node_test.rb
+++ b/test/unit/node_test.rb
@@ -15,6 +15,14 @@ class NodeTest < ActiveSupport::TestCase
15 @user2 = User.create :login => 'show', :email => "f@b.com", :password => 'foobar', :password_confirmation => 'foobar' 15 @user2 = User.create :login => 'show', :email => "f@b.com", :password => 'foobar', :password_confirmation => 'foobar'
16 end 16 end
17 17
18 test "can only create one root node" do
19 Node.delete_all
20 Node.create! :slug => :root
21 assert_raise(ActiveRecord::RecordInvalid) do
22 Node.create! :slug => :root
23 end
24 end
25
18 def test_returning_existing_drafts 26 def test_returning_existing_drafts
19 test_node = Node.root.children.create! :slug => "test_node" 27 test_node = Node.root.children.create! :slug => "test_node"
20 28