code cleanup: rubocop: fix Layout/EmptyLinesAroundBlockBody in test/integration/api_test/issues_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18561 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2019-09-30 10:58:50 +00:00
parent 4bd1cbfd70
commit 9237457518
2 changed files with 21 additions and 26 deletions

View File

@@ -183,7 +183,6 @@ Layout/EmptyLinesAroundBlockBody:
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb' - 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
- 'test/functional/issues_controller_test.rb' - 'test/functional/issues_controller_test.rb'
- 'test/integration/api_test/attachments_test.rb' - 'test/integration/api_test/attachments_test.rb'
- 'test/integration/api_test/issues_test.rb'
- 'test/integration/api_test/my_test.rb' - 'test/integration/api_test/my_test.rb'
# Cop supports --auto-correct. # Cop supports --auto-correct.

View File

@@ -482,18 +482,16 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
end end
test "POST /issues.xml should create an issue with the attributes" do test "POST /issues.xml should create an issue with the attributes" do
payload = <<~XML
payload = <<-XML <?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?> <issue>
<issue> <project_id>1</project_id>
<project_id>1</project_id> <tracker_id>2</tracker_id>
<tracker_id>2</tracker_id> <status_id>3</status_id>
<status_id>3</status_id> <category_id>2</category_id>
<category_id>2</category_id> <subject>API test</subject>
<subject>API test</subject> </issue>
</issue> XML
XML
assert_difference('Issue.count') do assert_difference('Issue.count') do
post '/issues.xml', post '/issues.xml',
:params => payload, :params => payload,
@@ -539,19 +537,17 @@ XML
end end
test "POST /issues.json should create an issue with the attributes" do test "POST /issues.json should create an issue with the attributes" do
payload = <<~JSON
payload = <<-JSON {
{ "issue": {
"issue": { "project_id": "1",
"project_id": "1", "tracker_id": "2",
"tracker_id": "2", "status_id": "3",
"status_id": "3", "category_id": "2",
"category_id": "2", "subject": "API test"
"subject": "API test" }
} }
} JSON
JSON
assert_difference('Issue.count') do assert_difference('Issue.count') do
post '/issues.json', post '/issues.json',
:params => payload, :params => payload,