aboutsummaryrefslogtreecommitdiffstats
path: root/spec/services
diff options
context:
space:
mode:
authorTeddy Wing2017-08-25 19:09:29 +0200
committerTeddy Wing2017-08-25 19:11:44 +0200
commit3f7c607546caf3fa3cad0fd5e4d47a84637f352e (patch)
treef928d77bcb33a00c15ba160a0a3aded4238b7f02 /spec/services
parenta8a04ac132a11cf33df90a7f82c9e53880bc164f (diff)
downloadchouette-core-3f7c607546caf3fa3cad0fd5e4d47a84637f352e.tar.bz2
HTTPService spec: Remove upload mock expectations
These relied on the previous behaviour of `#post_resource` handling uploads. This is no longer the case. Instead, you have to call `HTTPService.upload` manually and pass the result to `#post_resource` via the `params` argument (like in `WorkbenchImportWorker#params`).
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/http_service_spec.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/spec/services/http_service_spec.rb b/spec/services/http_service_spec.rb
index 8c8af480c..25cc1ee35 100644
--- a/spec/services/http_service_spec.rb
+++ b/spec/services/http_service_spec.rb
@@ -33,9 +33,6 @@ RSpec.describe HTTPService do
let( :upload_list ){ [value, mime_type, as_name] }
it 'sets authorization and posts data' do
- expect(Faraday::UploadIO).to receive(:new).with(*upload_list).and_return upload_io
- expect(params).to receive(:update).with(name => upload_io)
-
expect(Faraday).to receive(:new).with(url: host).and_yield(faraday_connection)
expect(faraday_connection).to receive(:adapter).with(Faraday.default_adapter)
expect(faraday_connection).to receive(:headers).and_return headers