diff options
| -rw-r--r-- | app/controllers/nodes_controller.rb | 2 | ||||
| -rw-r--r-- | test/functional/nodes_controller_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index f82ab82..0c961b7 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -32,7 +32,7 @@ class NodesController < ApplicationController | |||
| 32 | 32 | ||
| 33 | if parent and @node.save | 33 | if parent and @node.save |
| 34 | @node.move_to_child_of parent | 34 | @node.move_to_child_of parent |
| 35 | redirect_to(@node) | 35 | redirect_to(edit_node_path(@node)) |
| 36 | else | 36 | else |
| 37 | @node.errors.add("Parent node") | 37 | @node.errors.add("Parent node") |
| 38 | render :action => :new | 38 | render :action => :new |
diff --git a/test/functional/nodes_controller_test.rb b/test/functional/nodes_controller_test.rb index fdeb6cb..edc49b6 100644 --- a/test/functional/nodes_controller_test.rb +++ b/test/functional/nodes_controller_test.rb | |||
| @@ -19,7 +19,7 @@ class NodesControllerTest < ActionController::TestCase | |||
| 19 | def test_create | 19 | def test_create |
| 20 | login_as :quentin | 20 | login_as :quentin |
| 21 | post :create, :node => {:slug => 'foobar'}, :parent_id => Node.root.id | 21 | post :create, :node => {:slug => 'foobar'}, :parent_id => Node.root.id |
| 22 | assert_redirected_to node_path(Node.last) | 22 | assert_redirected_to edit_node_path(Node.last) |
| 23 | end | 23 | end |
| 24 | 24 | ||
| 25 | def test_editing_a_node | 25 | def test_editing_a_node |
