From 3a894f3a9112fcba80fc95d4edf17c5783bcdbdb Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 10 Jul 2018 07:05:51 +0000 Subject: [PATCH] Test for r17441 (#29189). Contributed by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17442 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/groups_controller_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/functional/groups_controller_test.rb b/test/functional/groups_controller_test.rb index 554323897..6cdf5009d 100644 --- a/test/functional/groups_controller_test.rb +++ b/test/functional/groups_controller_test.rb @@ -54,6 +54,20 @@ class GroupsControllerTest < Redmine::ControllerTest assert_response :success end + def test_show_should_display_custom_fields + GroupCustomField.generate!(name: 'field_visible', visible: true) + Group.find(10).update(custom_field_values: {GroupCustomField.last.id => 'value_visible'}) + GroupCustomField.generate!(name: 'field_invisible', visible: false) + Group.find(10).update(custom_field_values: {GroupCustomField.last.id => 'value_invisible'}) + get :show, :params => {:id => 10} + assert_response :success + + assert_select 'li', :text => /field_visible/ + assert_select 'li', :text => /value_visible/ + assert_select 'li', :text => /field_invisible/, :count => 0 + assert_select 'li', :text => /value_invisible/, :count => 0 + end + def test_show_invalid_should_return_404 get :show, :params => { :id => 99