From baaa15ebdd0c49a9003d8dbd6910519f808b5499 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 30 Aug 2016 21:15:13 +0000 Subject: 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 --- test/integration/api_test/attachments_test.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/integration/api_test') 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 -- cgit v1.2.3