mirror of
https://github.com/redmine/redmine.git
synced 2025-11-11 15:56:03 +01:00
code cleanup: rubocop: fix Layout/EmptyLinesAroundBlockBody in test/integration/api_test/attachments_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18651 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -189,7 +189,6 @@ Layout/EmptyLinesAroundBlockBody:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'db/schema.rb'
|
- 'db/schema.rb'
|
||||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||||
- 'test/integration/api_test/attachments_test.rb'
|
|
||||||
- 'test/integration/api_test/my_test.rb'
|
- 'test/integration/api_test/my_test.rb'
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
|||||||
@@ -219,14 +219,11 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
|
|||||||
"CONTENT_TYPE" => 'application/octet-stream'
|
"CONTENT_TYPE" => 'application/octet-stream'
|
||||||
}.merge(credentials('jsmith'))
|
}.merge(credentials('jsmith'))
|
||||||
assert_response :created
|
assert_response :created
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
json = ActiveSupport::JSON.decode(response.body)
|
json = ActiveSupport::JSON.decode(response.body)
|
||||||
assert_kind_of Hash, json['upload']
|
assert_kind_of Hash, json['upload']
|
||||||
token = json['upload']['token']
|
token = json['upload']['token']
|
||||||
assert token.present?
|
assert token.present?
|
||||||
|
|
||||||
assert attachment = Attachment.find_by_token(token)
|
assert attachment = Attachment.find_by_token(token)
|
||||||
assert_equal 0, attachment.filesize
|
assert_equal 0, attachment.filesize
|
||||||
assert attachment.digest.present?
|
assert attachment.digest.present?
|
||||||
|
|||||||
Reference in New Issue
Block a user