diff options
| author | hukl <contact@smyck.org> | 2009-03-01 15:32:56 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-01 15:32:56 +0100 |
| commit | 9843bfc6f0451ab71b552eb92deeb29a173ae665 (patch) | |
| tree | a3f560778f89bca0b86e27aae809d09b3c598c88 /test/functional/nodes_controller_test.rb | |
| parent | 02fc7b48da2944f1f46360d939c95bb2d4ba94d2 (diff) | |
tiny new test
Diffstat (limited to 'test/functional/nodes_controller_test.rb')
| -rw-r--r-- | test/functional/nodes_controller_test.rb | 12 |
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 |
