Exclude:
- 'db/schema.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
- - 'test/integration/api_test/attachments_test.rb'
- 'test/integration/api_test/my_test.rb'
# Cop supports --auto-correct.
"CONTENT_TYPE" => 'application/octet-stream'
}.merge(credentials('jsmith'))
assert_response :created
-
end
-
json = ActiveSupport::JSON.decode(response.body)
assert_kind_of Hash, json['upload']
token = json['upload']['token']
assert token.present?
-
assert attachment = Attachment.find_by_token(token)
assert_equal 0, attachment.filesize
assert attachment.digest.present?