diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-11 02:06:28 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-11 02:06:28 +0000 |
commit | d046da0d85014b7d0efeee4cea8e662f4b564c08 (patch) | |
tree | 5d417666275dbf64f0581c5eca28e49becde3738 /test/helpers | |
parent | f264512183a101fcd5bad584d2ee96ff89873d05 (diff) | |
download | redmine-d046da0d85014b7d0efeee4cea8e662f4b564c08.tar.gz redmine-d046da0d85014b7d0efeee4cea8e662f4b564c08.zip |
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
Diffstat (limited to 'test/helpers')
-rw-r--r-- | test/helpers/custom_fields_helper_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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 |