code layout clean up test_bulk_update_with_some_failures_should_show_errors of IssuesControllerTest
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11891 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a968c1196e
commit
7def5b551d
|
@ -3617,15 +3617,15 @@ class IssuesControllerTest < ActionController::TestCase
|
|||
issue1 = Issue.generate!(:start_date => '2013-05-12')
|
||||
issue2 = Issue.generate!(:start_date => '2013-05-15')
|
||||
issue3 = Issue.generate!
|
||||
|
||||
@request.session[:user_id] = 2
|
||||
post :bulk_update, :ids => [issue1.id, issue2.id, issue3.id], :issue => {:due_date => '2013-05-01'}
|
||||
|
||||
post :bulk_update, :ids => [issue1.id, issue2.id, issue3.id],
|
||||
:issue => {:due_date => '2013-05-01'}
|
||||
assert_response :success
|
||||
assert_template 'bulk_edit'
|
||||
assert_select '#errorExplanation span', :text => "Failed to save 2 issue(s) on 3 selected: ##{issue1.id}, ##{issue2.id}."
|
||||
assert_select '#errorExplanation ul li', :text => "Due date must be greater than start date: ##{issue1.id}, ##{issue2.id}"
|
||||
|
||||
assert_select '#errorExplanation span',
|
||||
:text => "Failed to save 2 issue(s) on 3 selected: ##{issue1.id}, ##{issue2.id}."
|
||||
assert_select '#errorExplanation ul li',
|
||||
:text => "Due date must be greater than start date: ##{issue1.id}, ##{issue2.id}"
|
||||
assert_equal [issue1.id, issue2.id], assigns[:issues].map(&:id)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue