summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-30 21:15:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-30 21:15:13 +0000
commitbaaa15ebdd0c49a9003d8dbd6910519f808b5499 (patch)
tree21f059d995519adea794d0280e6e873639195015 /test/integration/api_test
parent942b85e441767b7bb66c33d341ca5f12b2df0a7b (diff)
downloadredmine-baaa15ebdd0c49a9003d8dbd6910519f808b5499.tar.gz
redmine-baaa15ebdd0c49a9003d8dbd6910519f808b5499.zip
Return attachment id in api response to attachment upload (#23566).
Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15762 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test')
-rw-r--r--test/integration/api_test/attachments_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb
index 640a78290..c7d2869ee 100644
--- a/test/integration/api_test/attachments_test.rb
+++ b/test/integration/api_test/attachments_test.rb
@@ -111,9 +111,12 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base
assert_kind_of Hash, xml['upload']
token = xml['upload']['token']
assert_not_nil token
+ attachment_id = xml['upload']['id']
+ assert_not_nil attachment_id
attachment = Attachment.order('id DESC').first
assert_equal token, attachment.token
+ assert_equal attachment_id, attachment.id.to_s
assert_nil attachment.container
assert_equal 2, attachment.author_id
assert_equal 'File content'.size, attachment.filesize