mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 23:36:01 +01:00
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:
@@ -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.
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user