mirror of
https://github.com/redmine/redmine.git
synced 2026-07-08 19:22:10 +02:00
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:
@@ -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
|
||||
|
||||
@@ -21,9 +21,9 @@ class RoutingJournalsTest < Redmine::RoutingTest
|
||||
def test_journals
|
||||
should_route 'POST /issues/1/quoted' => 'journals#new', :id => '1'
|
||||
should_route 'GET /issues/changes' => 'journals#index'
|
||||
should_route 'GET /journals/diff/1' => 'journals#diff', :id => '1'
|
||||
should_route 'GET /journals/1/diff' => 'journals#diff', :id => '1'
|
||||
|
||||
should_route 'GET /journals/edit/1' => 'journals#edit', :id => '1'
|
||||
should_route 'POST /journals/edit/1' => 'journals#edit', :id => '1'
|
||||
should_route 'GET /journals/1/edit' => 'journals#edit', :id => '1'
|
||||
should_route 'PUT /journals/1' => 'journals#update', :id => '1'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -68,7 +68,7 @@ class MailerTest < ActiveSupport::TestCase
|
||||
# should be https://mydomain.foo/journals/diff/3?detail_id=4
|
||||
# but the Rails 4.2 DOM assertion doesn't handle the ? in the
|
||||
# attribute value
|
||||
'https://mydomain.foo/journals/diff/3',
|
||||
'https://mydomain.foo/journals/3/diff',
|
||||
'View differences',
|
||||
:text => 'diff'
|
||||
# link to an attachment
|
||||
@@ -109,7 +109,7 @@ class MailerTest < ActiveSupport::TestCase
|
||||
# should be http://mydomain.foo/rdm/journals/diff/3?detail_id=4
|
||||
# but the Rails 4.2 DOM assertion doesn't handle the ? in the
|
||||
# attribute value
|
||||
'http://mydomain.foo/rdm/journals/diff/3',
|
||||
'http://mydomain.foo/rdm/journals/3/diff',
|
||||
'View differences',
|
||||
:text => 'diff'
|
||||
# link to an attachment
|
||||
@@ -179,7 +179,7 @@ class MailerTest < ActiveSupport::TestCase
|
||||
# should be http://mydomain.foo/rdm/journals/diff/3?detail_id=4
|
||||
# but the Rails 4.2 DOM assertion doesn't handle the ? in the
|
||||
# attribute value
|
||||
'http://mydomain.foo/rdm/journals/diff/3',
|
||||
'http://mydomain.foo/rdm/journals/3/diff',
|
||||
'View differences',
|
||||
:text => 'diff'
|
||||
# link to an attachment
|
||||
|
||||
Reference in New Issue
Block a user