From 7cf16d4abd3efde6444366d2ae9cebdb21c13713 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 9 Apr 2019 14:53:55 +0000 Subject: "Create and continue" button for custom fields (#31159). Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@18054 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/custom_fields_controller_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb index c243902e5..e9c5bdf0b 100644 --- a/test/functional/custom_fields_controller_test.rb +++ b/test/functional/custom_fields_controller_test.rb @@ -256,6 +256,20 @@ class CustomFieldsControllerTest < Redmine::ControllerTest assert_equal [1, 3], field.projects.map(&:id).sort end + def test_create_with_continue_params + assert_difference 'CustomField.count' do + post :create, :params => { + :type => 'IssueCustomField', + :continue => 'Create and Continue', + :custom_field => { + :name => 'foo', + :field_format => 'string' + } + } + end + assert_redirected_to '/custom_fields/new?type=IssueCustomField' + end + def test_create_with_failure assert_no_difference 'CustomField.count' do post :create, :params => { -- cgit v1.2.3