Commit 07239fce authored by maeda's avatar maeda

Test for r17441 (#29189).

Contributed by Mizuki ISHIKAWA.


git-svn-id: https://svn.redmine.org/redmine/trunk@17442 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent bcbef340
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment