summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-18 06:01:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-18 06:01:43 +0000
commit89cfe130fc0498e66a65e133ac6efdcedc0389be (patch)
tree8c580cceef06997ffb4d2e8f127573cd78d3d360 /test/functional
parent446b3bfaca6f93b3b87f11b597e25039c00af690 (diff)
downloadredmine-89cfe130fc0498e66a65e133ac6efdcedc0389be.tar.gz
redmine-89cfe130fc0498e66a65e133ac6efdcedc0389be.zip
Merged r15532 to r15534 (#23054).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15537 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/timelog_controller_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index ce6f5936c..c3e96793d 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -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'