Use regular edit/update actions and named routes for JournalsController.

git-svn-id: http://svn.redmine.org/redmine/trunk@15074 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-01-21 04:39:56 +00:00
parent e2a999743e
commit 6bb1ea8ae8
9 changed files with 38 additions and 34 deletions

View File

@@ -199,7 +199,7 @@ class JournalsControllerTest < ActionController::TestCase
def test_update_xhr
@request.session[:user_id] = 1
xhr :post, :edit, :id => 2, :notes => 'Updated notes'
xhr :post, :update, :id => 2, :notes => 'Updated notes'
assert_response :success
assert_template 'update'
assert_equal 'text/javascript', response.content_type
@@ -210,7 +210,7 @@ class JournalsControllerTest < ActionController::TestCase
def test_update_xhr_with_empty_notes_should_delete_the_journal
@request.session[:user_id] = 1
assert_difference 'Journal.count', -1 do
xhr :post, :edit, :id => 2, :notes => ''
xhr :post, :update, :id => 2, :notes => ''
assert_response :success
assert_template 'update'
assert_equal 'text/javascript', response.content_type