mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 06:46:01 +01:00
Preserve field values on bulk edit failure (#13943).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11787 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -3616,6 +3616,18 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
assert_equal [issue1.id, issue2.id], assigns[:issues].map(&:id)
|
||||
end
|
||||
|
||||
def test_bulk_update_with_failure_should_preserved_form_values
|
||||
@request.session[:user_id] = 2
|
||||
post :bulk_update, :ids => [1, 2], :issue => {:tracker_id => '2', :start_date => 'foo'}
|
||||
|
||||
assert_response :success
|
||||
assert_template 'bulk_edit'
|
||||
assert_select 'select[name=?]', 'issue[tracker_id]' do
|
||||
assert_select 'option[value=2][selected=selected]'
|
||||
end
|
||||
assert_select 'input[name=?][value=?]', 'issue[start_date]', 'foo'
|
||||
end
|
||||
|
||||
def test_get_bulk_copy
|
||||
@request.session[:user_id] = 2
|
||||
get :bulk_edit, :ids => [1, 2, 3], :copy => '1'
|
||||
|
||||
Reference in New Issue
Block a user