mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
Fix deprecated use of #stub in payment spec
Fixes:
Using `stub` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /home/runner/work/openfoodnetwork/openfoodnetwork/spec/models/spree/payment_spec.rb:10:in `block (3 levels) in <top (required)>'.
RuntimeError:
stubbed models are not allowed to access the database - Spree::Product#touch(updated_at,{:time=>2021-04-10 14:24:50 UTC})
This commit is contained in:
@@ -7,7 +7,7 @@ describe Spree::Payment do
|
||||
let(:order) { create(:order) }
|
||||
let(:gateway) do
|
||||
gateway = Spree::Gateway::Bogus.new(environment: 'test', active: true)
|
||||
gateway.stub source_required: true
|
||||
allow(gateway).to receive(:source_required) { true }
|
||||
gateway
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user