@@ -39,7 +39,7 @@ class CustomFieldsGroupsControllerTest < ActionController::TestCase
39
39
assert_select 'input[type=checkbox][name=?][value=?]' , 'custom_fields_group[custom_field_ids][]' , '9'
40
40
end
41
41
42
- test 'should create custom fields gruop ' do
42
+ test 'should create custom fields group ' do
43
43
assert_difference 'CustomFieldsGroup.count' do
44
44
post :create , :params => {
45
45
:custom_fields_group => {
@@ -55,7 +55,24 @@ class CustomFieldsGroupsControllerTest < ActionController::TestCase
55
55
assert_equal 4 , custom_fields_group . position
56
56
end
57
57
58
- test 'should not create custom fields gruop without name' do
58
+ test 'should create custom fields group with continue params' do
59
+ assert_difference 'CustomFieldsGroup.count' do
60
+ post :create , :params => {
61
+ :custom_fields_group => {
62
+ :name => 'Group 4' ,
63
+ :custom_field_ids => [ 9 ]
64
+ } ,
65
+ :continue => 'Create and add another'
66
+ }
67
+ end
68
+ assert_redirected_to '/custom_fields_groups/new'
69
+
70
+ assert custom_fields_group = CustomFieldsGroup . find_by_name ( 'Group 4' )
71
+ assert_equal [ 9 ] , custom_fields_group . custom_field_ids
72
+ assert_equal 4 , custom_fields_group . position
73
+ end
74
+
75
+ test 'should not create custom fields group without name' do
59
76
post :create , :params => {
60
77
:custom_fields_group => {
61
78
:name => '' ,
0 commit comments