diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-14 11:13:38 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-14 11:13:38 +0000 |
commit | 762d015e1548f7d994501340515e13e5225551aa (patch) | |
tree | 61deea4ac64fc83ac7bd10e42e71569ac4ca93e6 /test/integration/api_test | |
parent | b9d215c656ac9d14560e90b5332f905e32d1bd6f (diff) | |
download | redmine-762d015e1548f7d994501340515e13e5225551aa.tar.gz redmine-762d015e1548f7d994501340515e13e5225551aa.zip |
code cleanup: rubocop: fix Layout/IndentHeredoc in test/integration/api_test/files_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18650 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test')
-rw-r--r-- | test/integration/api_test/files_test.rb | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/test/integration/api_test/files_test.rb b/test/integration/api_test/files_test.rb index f57461ef2..260541094 100644 --- a/test/integration/api_test/files_test.rb +++ b/test/integration/api_test/files_test.rb @@ -41,11 +41,11 @@ class Redmine::ApiTest::FilesTest < Redmine::ApiTest::Base :params => 'File content', :headers => {"CONTENT_TYPE" => 'application/octet-stream'}.merge(credentials('jsmith')) token = Attachment.last.token - payload = <<-JSON -{ "file": { - "token": "#{token}" - } -} + payload = <<~JSON + { "file": { + "token": "#{token}" + } + } JSON post '/projects/1/files.json', :params => payload, @@ -61,10 +61,10 @@ class Redmine::ApiTest::FilesTest < Redmine::ApiTest::Base :params => 'File content', :headers => {"CONTENT_TYPE" => 'application/octet-stream'}.merge(credentials('jsmith')) token = Attachment.last.token - payload = <<-XML -<file> - <token>#{token}</token> -</file> + payload = <<~XML + <file> + <token>#{token}</token> + </file> XML post '/projects/1/files.xml', :params => payload, @@ -75,11 +75,11 @@ class Redmine::ApiTest::FilesTest < Redmine::ApiTest::Base end test "POST /projects/:project_id/files.json should refuse requests without the :token parameter" do - payload = <<-JSON -{ "file": { - "filename": "project_file.zip", - } -} + payload = <<~JSON + { "file": { + "filename": "project_file.zip", + } + } JSON post '/projects/1/files.json', :params => payload, @@ -93,14 +93,14 @@ class Redmine::ApiTest::FilesTest < Redmine::ApiTest::Base :params => 'File content', :headers => {"CONTENT_TYPE" => 'application/octet-stream'}.merge(credentials('jsmith')) token = Attachment.last.token - payload = <<-JSON -{ "file": { - "filename": "New filename", - "description": "New description", - "content_type": "application/txt", - "token": "#{token}" - } -} + payload = <<~JSON + { "file": { + "filename": "New filename", + "description": "New description", + "content_type": "application/txt", + "token": "#{token}" + } + } JSON post '/projects/1/files.json', :params => payload, @@ -117,14 +117,14 @@ class Redmine::ApiTest::FilesTest < Redmine::ApiTest::Base :params => 'File content', :headers => {"CONTENT_TYPE" => 'application/octet-stream'}.merge(credentials('jsmith')) token = Attachment.last.token - payload = <<-JSON -{ "file": { - "version_id": 3, - "filename": "New filename", - "description": "New description", - "token": "#{token}" - } -} + payload = <<~JSON + { "file": { + "version_id": 3, + "filename": "New filename", + "description": "New description", + "token": "#{token}" + } + } JSON post '/projects/1/files.json', :params => payload, |