From d046da0d85014b7d0efeee4cea8e662f4b564c08 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 11 May 2019 02:06:28 +0000 Subject: Set an appropriate default type in New custom field page depending on the current tab (#31320). Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@18156 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/helpers/custom_fields_helper_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/helpers') diff --git a/test/helpers/custom_fields_helper_test.rb b/test/helpers/custom_fields_helper_test.rb index 031692112..9bbdcd8e6 100644 --- a/test/helpers/custom_fields_helper_test.rb +++ b/test/helpers/custom_fields_helper_test.rb @@ -95,4 +95,14 @@ class CustomFieldsHelperTest < Redmine::HelperTest assert_select_in custom_field_tag('object', value), 'textarea[class=?]', 'text_cf wiki-edit' end + + def test_select_type_radio_buttons + result = select_type_radio_buttons('UserCustomField') + assert_select_in result, 'input[type="radio"]', :count => 10 + assert_select_in result, 'input#type_UserCustomField[checked=?]', 'checked' + + result = select_type_radio_buttons(nil) + assert_select_in result, 'input[type="radio"]', :count => 10 + assert_select_in result, 'input#type_IssueCustomField[checked=?]', 'checked' + end end -- cgit v1.2.3