@@ -527,6 +527,15 class TimelogControllerTest < ActionController::TestCase | |||
|
527 | 527 | assert_equal ["0", "0"], TimeEntry.where(:id => [1, 2]).collect {|i| i.custom_value_for(10).value} |
|
528 | 528 | end |
|
529 | 529 | |
|
530 | def test_bulk_update_clear_custom_field | |
|
531 | field = TimeEntryCustomField.generate!(:field_format => 'string') | |
|
532 | @request.session[:user_id] = 2 | |
|
533 | post :bulk_update, :ids => [1, 2], :time_entry => { :custom_field_values => {field.id.to_s => '__none__'} } | |
|
534 | ||
|
535 | assert_response 302 | |
|
536 | assert_equal ["", ""], TimeEntry.where(:id => [1, 2]).collect {|i| i.custom_value_for(field).value} | |
|
537 | end | |
|
538 | ||
|
530 | 539 | def test_post_bulk_update_should_redirect_back_using_the_back_url_parameter |
|
531 | 540 | @request.session[:user_id] = 2 |
|
532 | 541 | post :bulk_update, :ids => [1,2], :back_url => '/time_entries' |
General Comments 0
You need to be logged in to leave comments.
Login now