FIX: don't double request when downloading a file

This commit is contained in:
Régis Hanol
2018-02-24 12:35:57 +01:00
parent b731d5d9b5
commit 0559a4736a
17 changed files with 80 additions and 132 deletions

View File

@ -35,11 +35,8 @@ describe OneboxController do
url = "http://noodle.com/"
stub_request(:head, url).
to_return(status: 200, body: "", headers: {}).then.to_raise
stub_request(:get, url)
.to_return(status: 200, headers: {}, body: onebox_html).then.to_raise
stub_request(:head, url)
stub_request(:get, url).to_return(body: onebox_html).then.to_raise
get :show, params: { url: url, refresh: "true" }, format: :json