mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-08 22:56:06 +00:00
Transpec specs
This commit is contained in:
@@ -22,9 +22,9 @@ describe Spree::Preferences::Preferable do
|
||||
|
||||
before :each do
|
||||
@a = A.new
|
||||
@a.stub(persisted?: true)
|
||||
allow(@a).to receive_messages(persisted?: true)
|
||||
@b = B.new
|
||||
@b.stub(persisted?: true)
|
||||
allow(@b).to receive_messages(persisted?: true)
|
||||
|
||||
# ensure we're persisting as that is the default
|
||||
#
|
||||
|
||||
@@ -37,7 +37,7 @@ describe Spree::Preferences::Store do
|
||||
|
||||
it "should return and cache fallback value when persistence is disabled (i.e. on bootstrap)" do
|
||||
Rails.cache.clear
|
||||
@store.stub(should_persist?: false)
|
||||
allow(@store).to receive_messages(should_persist?: false)
|
||||
expect(@store.get(:test, true)).to be_truthy
|
||||
expect(Rails.cache.read(:test)).to be_truthy
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user