From 9843bfc6f0451ab71b552eb92deeb29a173ae665 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 1 Mar 2009 15:32:56 +0100 Subject: tiny new test --- test/functional/nodes_controller_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/functional') 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 assert_response :success end + def test_new + login_as :quentin + get :new + assert_response :success + end + + def test_create + login_as :quentin + post :create, :node => {:slug => 'foobar'}, :parent_id => Node.root.id + assert_redirected_to node_path(Node.last) + end + def test_update_a_draft test_node = Node.create! :slug => "test_node" test_node.move_to_child_of Node.root -- cgit v1.3