spec/lib/sdk4me/attachments_spec.rb in 4me-sdk-2.0.0.pre.rc.2 vs spec/lib/sdk4me/attachments_spec.rb in 4me-sdk-2.0.0.pre.rc.3
- old
+ new
@@ -326,13 +326,13 @@
'Authorization' => (authentication == :api_token ? 'Basic c2VjcmV0Ong=' : 'Bearer secret'),
'Content-Type' => 'multipart/form-data; boundary=0123456789ABLEWASIEREISAWELBA9876543210',
'User-Agent' => "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/523.10.6 (KHTML, like Gecko) Version/3.0.4 Safari/523.10.6 4me/#{Sdk4me::Client::VERSION}"
}
)
- .to_return(status: 204, body: '', headers: {})
+ .to_return(status: 200, headers: {}, body: %({"key":"attachments/5/zxxb4ot60xfd6sjg/s3test.txt"}))
expect(a.send(:upload_attachment, file.path)).to eq({
- key: "attachments/5/requests/000/000/777/abc/#{File.basename(file.path)}",
+ key: 'attachments/5/zxxb4ot60xfd6sjg/s3test.txt',
filesize: 6
})
end
end
end