mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
fix source indent of test/integration/api_test/attachments_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19919 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -100,10 +100,11 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
test "PATCH /attachments/:id.json should update the attachment" do
|
test "PATCH /attachments/:id.json should update the attachment" do
|
||||||
patch '/attachments/7.json',
|
patch(
|
||||||
|
'/attachments/7.json',
|
||||||
:params => {:attachment => {:filename => 'renamed.zip', :description => 'updated'}},
|
:params => {:attachment => {:filename => 'renamed.zip', :description => 'updated'}},
|
||||||
:headers => credentials('jsmith')
|
:headers => credentials('jsmith')
|
||||||
|
)
|
||||||
assert_response :no_content
|
assert_response :no_content
|
||||||
assert_nil response.media_type
|
assert_nil response.media_type
|
||||||
attachment = Attachment.find(7)
|
attachment = Attachment.find(7)
|
||||||
@@ -112,10 +113,11 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
test "PATCH /attachments/:id.json with failure should return the errors" do
|
test "PATCH /attachments/:id.json with failure should return the errors" do
|
||||||
patch '/attachments/7.json',
|
patch(
|
||||||
|
'/attachments/7.json',
|
||||||
:params => {:attachment => {:filename => '', :description => 'updated'}},
|
:params => {:attachment => {:filename => '', :description => 'updated'}},
|
||||||
:headers => credentials('jsmith')
|
:headers => credentials('jsmith')
|
||||||
|
)
|
||||||
assert_response 422
|
assert_response 422
|
||||||
assert_equal 'application/json', response.media_type
|
assert_equal 'application/json', response.media_type
|
||||||
json = ActiveSupport::JSON.decode(response.body)
|
json = ActiveSupport::JSON.decode(response.body)
|
||||||
|
|||||||
Reference in New Issue
Block a user