summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/nodes_controller_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/nodes_controller_test.rb b/test/functional/nodes_controller_test.rb
index 08e50fd..801f2c0 100644
--- a/test/functional/nodes_controller_test.rb
+++ b/test/functional/nodes_controller_test.rb
@@ -70,6 +70,22 @@ class NodesControllerTest < ActionController::TestCase
70 assert_equal 1, Node.last.level 70 assert_equal 1, Node.last.level
71 end 71 end
72 72
73 test "creating a top_level node without a title should not work" do
74 login_as :quentin
75
76 assert_no_difference "Node.count" do
77 post(:create, :kind => "top_level")
78 end
79 end
80
81 test "creating a generic node without a parent_id should not work" do
82 login_as :quentin
83
84 assert_no_difference "Node.count" do
85 post(:create, :kind => "generic")
86 end
87 end
88
73 def test_editing_a_node 89 def test_editing_a_node
74 login_as :quentin 90 login_as :quentin
75 91