summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-24 18:18:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-24 18:18:08 +0000
commitdc5e5eca6b7cb124da1e47036f8a688bb4a7688c (patch)
treecb32b83d39d2b7897eb2f28c3fc94b4bb611d930 /test
parent4069f95fd1bc98ab2b500f5f23d882d00d11bc11 (diff)
downloadredmine-dc5e5eca6b7cb124da1e47036f8a688bb4a7688c.tar.gz
redmine-dc5e5eca6b7cb124da1e47036f8a688bb4a7688c.zip
Fixed that displaying time entries with custom field column raises an error (#5037).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12041 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/timelog_controller_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 2cc9bf778..5735260ca 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -548,6 +548,17 @@ class TimelogControllerTest < ActionController::TestCase
assert_select 'td.issue_cf_2', :text => 'filter_on_issue_custom_field'
end
+ def test_index_with_time_entry_custom_field_column
+ field = TimeEntryCustomField.generate!(:field_format => 'string')
+ entry = TimeEntry.generate!(:hours => 2.5, :custom_field_values => {field.id => 'CF Value'})
+ field_name = "cf_#{field.id}"
+
+ get :index, :c => ["hours", field_name]
+ assert_response :success
+ assert_include field_name.to_sym, assigns(:query).column_names
+ assert_select "td.#{field_name}", :text => 'CF Value'
+ end
+
def test_index_atom_feed
get :index, :project_id => 1, :format => 'atom'
assert_response :success