summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/projects_controller_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index 786bcebba..6be670566 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -230,6 +230,24 @@ class ProjectsControllerTest < Redmine::ControllerTest
)
end
+ def test_index_with_int_custom_field_total
+ @request.session[:user_id] = 1
+
+ field = ProjectCustomField.generate!(:field_format => 'int')
+ CustomValue.create!(:customized => Project.find(1), :custom_field => field, :value => '2')
+ CustomValue.create!(:customized => Project.find(2), :custom_field => field, :value => '7')
+ get(
+ :index,
+ :params => {
+ :display_type => 'list',
+ :t => ["cf_#{field.id}"]
+ }
+ )
+ assert_response :success
+ assert_select '.query-totals'
+ assert_select ".total-for-cf-#{field.id} span.value", :text => '9'
+ end
+
def test_autocomplete_js
get(
:autocomplete,