summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-01-28 01:17:57 +0000
committerGo MAEDA <maeda@farend.jp>2020-01-28 01:17:57 +0000
commitb4ada2b5ef471c8b60a37d098c8140e04286a890 (patch)
tree0a08742ae4e57f6dcdc2c7bff1d81892a32bd9d7 /test/functional
parent2845d18158d12629348cf5c53c48534d3e91632e (diff)
downloadredmine-b4ada2b5ef471c8b60a37d098c8140e04286a890.tar.gz
redmine-b4ada2b5ef471c8b60a37d098c8140e04286a890.zip
Merged r19469 from trunk to 4.1-stable (#32896).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19470 e93f8b46-1217-0410-a6f0-8f06a7374b81
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 b09af65bb..975e3bb6a 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -232,6 +232,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, :params => {
:format => 'js',