summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test/issues_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-09-25 17:55:26 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-09-25 17:55:26 +0000
commitea3c11bf3285b86be9404dcf1816a0d339f989e0 (patch)
tree0ad599c98b8596919de26f361281eb5af6e7cc1d /test/integration/api_test/issues_test.rb
parent2e1da01790ff13d267ef0328b611145b7c064060 (diff)
downloadredmine-ea3c11bf3285b86be9404dcf1816a0d339f989e0.tar.gz
redmine-ea3c11bf3285b86be9404dcf1816a0d339f989e0.zip
code cleanup: rubocop: fix Layout/ClosingHeredocIndentation in test/integration/api_test/issues_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18538 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test/issues_test.rb')
-rw-r--r--test/integration/api_test/issues_test.rb66
1 files changed, 31 insertions, 35 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb
index 516221801..a9f9a4159 100644
--- a/test/integration/api_test/issues_test.rb
+++ b/test/integration/api_test/issues_test.rb
@@ -905,26 +905,24 @@ JSON
def test_create_issue_with_multiple_uploaded_files_as_xml
token1 = xml_upload('File content 1', credentials('jsmith'))
token2 = xml_upload('File content 2', credentials('jsmith'))
-
- payload = <<-XML
-<?xml version="1.0" encoding="UTF-8" ?>
-<issue>
- <project_id>1</project_id>
- <tracker_id>1</tracker_id>
- <subject>Issue with multiple attachments</subject>
- <uploads type="array">
- <upload>
- <token>#{token1}</token>
- <filename>test1.txt</filename>
- </upload>
- <upload>
- <token>#{token2}</token>
- <filename>test1.txt</filename>
- </upload>
- </uploads>
-</issue>
-XML
-
+ payload = <<~XML
+ <?xml version="1.0" encoding="UTF-8" ?>
+ <issue>
+ <project_id>1</project_id>
+ <tracker_id>1</tracker_id>
+ <subject>Issue with multiple attachments</subject>
+ <uploads type="array">
+ <upload>
+ <token>#{token1}</token>
+ <filename>test1.txt</filename>
+ </upload>
+ <upload>
+ <token>#{token2}</token>
+ <filename>test1.txt</filename>
+ </upload>
+ </uploads>
+ </issue>
+ XML
assert_difference 'Issue.count' do
post '/issues.xml',
:params => payload,
@@ -938,21 +936,19 @@ XML
def test_create_issue_with_multiple_uploaded_files_as_json
token1 = json_upload('File content 1', credentials('jsmith'))
token2 = json_upload('File content 2', credentials('jsmith'))
-
- payload = <<-JSON
-{
- "issue": {
- "project_id": "1",
- "tracker_id": "1",
- "subject": "Issue with multiple attachments",
- "uploads": [
- {"token": "#{token1}", "filename": "test1.txt"},
- {"token": "#{token2}", "filename": "test2.txt"}
- ]
- }
-}
-JSON
-
+ payload = <<~JSON
+ {
+ "issue": {
+ "project_id": "1",
+ "tracker_id": "1",
+ "subject": "Issue with multiple attachments",
+ "uploads": [
+ {"token": "#{token1}", "filename": "test1.txt"},
+ {"token": "#{token2}", "filename": "test2.txt"}
+ ]
+ }
+ }
+ JSON
assert_difference 'Issue.count' do
post '/issues.json',
:params => payload,