summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-09 09:18:09 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-09 09:18:09 +0000
commit4e148710cb686d4f38d62429c08794fdceb27913 (patch)
tree46d4e5fd083595a626775bcbb7a45253339ee2fb /test/integration/api_test
parent8688fd10ebd80912b1fc8e687fe13cc6a39c9aaa (diff)
downloadredmine-4e148710cb686d4f38d62429c08794fdceb27913.tar.gz
redmine-4e148710cb686d4f38d62429c08794fdceb27913.zip
cleanup: rubocop: fix Layout/AlignArguments in test/integration/api_test/custom_fields_attribute_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18999 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test')
-rw-r--r--test/integration/api_test/custom_fields_attribute_test.rb29
1 files changed, 15 insertions, 14 deletions
diff --git a/test/integration/api_test/custom_fields_attribute_test.rb b/test/integration/api_test/custom_fields_attribute_test.rb
index 04ab05c2f..8d8df7cee 100644
--- a/test/integration/api_test/custom_fields_attribute_test.rb
+++ b/test/integration/api_test/custom_fields_attribute_test.rb
@@ -24,12 +24,12 @@ class Redmine::ApiTest::CustomFieldsAttributeTest < Redmine::ApiTest::Base
def test_integer_custom_fields_should_accept_strings
field = GroupCustomField.generate!(:field_format => 'int')
-
- post '/groups.json',
+ post(
+ '/groups.json',
:params => %({"group":{"name":"Foo","custom_field_values":{"#{field.id}":"52"}}}),
:headers => {
'CONTENT_TYPE' => 'application/json'
- }.merge(credentials('admin'))
+ }.merge(credentials('admin')))
assert_response :created
group = Group.order('id DESC').first
assert_equal "52", group.custom_field_value(field)
@@ -37,12 +37,12 @@ class Redmine::ApiTest::CustomFieldsAttributeTest < Redmine::ApiTest::Base
def test_integer_custom_fields_should_accept_integers
field = GroupCustomField.generate!(:field_format => 'int')
-
- post '/groups.json',
+ post(
+ '/groups.json',
:params => %({"group":{"name":"Foo","custom_field_values":{"#{field.id}":52}}}),
:headers => {
'CONTENT_TYPE' => 'application/json'
- }.merge(credentials('admin'))
+ }.merge(credentials('admin')))
assert_response :created
group = Group.order('id DESC').first
assert_equal "52", group.custom_field_value(field)
@@ -50,12 +50,12 @@ class Redmine::ApiTest::CustomFieldsAttributeTest < Redmine::ApiTest::Base
def test_boolean_custom_fields_should_accept_strings
field = GroupCustomField.generate!(:field_format => 'bool')
-
- post '/groups.json',
+ post(
+ '/groups.json',
:params => %({"group":{"name":"Foo","custom_field_values":{"#{field.id}": "1"}}}),
:headers => {
'CONTENT_TYPE' => 'application/json'
- }.merge(credentials('admin'))
+ }.merge(credentials('admin')))
assert_response :created
group = Group.order('id DESC').first
assert_equal "1", group.custom_field_value(field)
@@ -63,12 +63,12 @@ class Redmine::ApiTest::CustomFieldsAttributeTest < Redmine::ApiTest::Base
def test_boolean_custom_fields_should_accept_integers
field = GroupCustomField.generate!(:field_format => 'bool')
-
- post '/groups.json',
+ post(
+ '/groups.json',
:params => %({"group":{"name":"Foo","custom_field_values":{"#{field.id}": 1}}}),
:headers => {
'CONTENT_TYPE' => 'application/json'
- }.merge(credentials('admin'))
+ }.merge(credentials('admin')))
assert_response :created
group = Group.order('id DESC').first
assert_equal "1", group.custom_field_value(field)
@@ -87,11 +87,12 @@ class Redmine::ApiTest::CustomFieldsAttributeTest < Redmine::ApiTest::Base
}
}
JSON
- post '/groups.json',
+ post(
+ '/groups.json',
:params => payload,
:headers => {
'CONTENT_TYPE' => 'application/json'
- }.merge(credentials('admin'))
+ }.merge(credentials('admin')))
assert_response :created
group = Group.order('id DESC').first
assert_equal ["V1", "V3"], group.custom_field_value(field).sort