mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
This fixes the following error
```
1) Spree::Admin::InvoicesController#poll when the file is available returns true
Failure/Error: spree_get :poll, invoice_id: invoice_id
#<File (class)> received :exist? with unexpected arguments
expected: ("tmp/invoices/479186263.pdf")
got: ("/home/pau/dev/openfoodnetwork/tmp/cache/paralleltests/3B7/CD1/spree%2Fapp_configuration%2Fredirect_https_to_http")
Please stub a default value first if message might be received with other args as well.
# ./spec/controllers/spree/admin/invoices_controller_spec.rb:28:in `block (4 levels) in <top (required)>'
# -e:1:in `<main>'
```
`paralleltests` also relies on `File.exist?` and so stubbing it breaks
it unless we purposefully allow other calls.