mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Test for r17441 (#29189).
Contributed by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17442 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
05bdaad399
commit
3a894f3a91
@ -54,6 +54,20 @@ class GroupsControllerTest < Redmine::ControllerTest
|
|||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
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
|
def test_show_invalid_should_return_404
|
||||||
get :show, :params => {
|
get :show, :params => {
|
||||||
:id => 99
|
:id => 99
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user