summaryrefslogtreecommitdiff
path: root/test/functional/nodes_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/nodes_controller_test.rb')
-rw-r--r--test/functional/nodes_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/nodes_controller_test.rb b/test/functional/nodes_controller_test.rb
index 98e694e..ed8afd8 100644
--- a/test/functional/nodes_controller_test.rb
+++ b/test/functional/nodes_controller_test.rb
@@ -10,6 +10,18 @@ class NodesControllerTest < ActionController::TestCase
10 assert_response :success 10 assert_response :success
11 end 11 end
12 12
13 def test_new
14 login_as :quentin
15 get :new
16 assert_response :success
17 end
18
19 def test_create
20 login_as :quentin
21 post :create, :node => {:slug => 'foobar'}, :parent_id => Node.root.id
22 assert_redirected_to node_path(Node.last)
23 end
24
13 def test_update_a_draft 25 def test_update_a_draft
14 test_node = Node.create! :slug => "test_node" 26 test_node = Node.create! :slug => "test_node"
15 test_node.move_to_child_of Node.root 27 test_node.move_to_child_of Node.root