1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-31 20:59:38 +00:00

Adds a test for #23054.

git-svn-id: http://svn.redmine.org/redmine/trunk@15533 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2016-06-15 18:18:43 +00:00
parent 755839dad7
commit e04913c863

View File

@ -527,6 +527,15 @@ class TimelogControllerTest < ActionController::TestCase
assert_equal ["0", "0"], TimeEntry.where(:id => [1, 2]).collect {|i| i.custom_value_for(10).value}
end
def test_bulk_update_clear_custom_field
field = TimeEntryCustomField.generate!(:field_format => 'string')
@request.session[:user_id] = 2
post :bulk_update, :ids => [1, 2], :time_entry => { :custom_field_values => {field.id.to_s => '__none__'} }
assert_response 302
assert_equal ["", ""], TimeEntry.where(:id => [1, 2]).collect {|i| i.custom_value_for(field).value}
end
def test_post_bulk_update_should_redirect_back_using_the_back_url_parameter
@request.session[:user_id] = 2
post :bulk_update, :ids => [1,2], :back_url => '/time_entries'