mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-23 05:28:53 +00:00
Use #allow instead of #stub
This commit is contained in:
@@ -5,7 +5,7 @@ describe CacheService do
|
||||
|
||||
describe "#cache" do
|
||||
before do
|
||||
rails_cache.stub(:fetch)
|
||||
allow(rails_cache).to receive(:fetch)
|
||||
end
|
||||
|
||||
it "provides a wrapper for basic #fetch calls to Rails.cache" do
|
||||
@@ -21,7 +21,7 @@ describe CacheService do
|
||||
let(:timestamp) { Time.now.to_i }
|
||||
|
||||
before do
|
||||
rails_cache.stub(:fetch)
|
||||
allow(rails_cache).to receive(:fetch)
|
||||
allow(Enterprise).to receive(:maximum).with(:updated_at).and_return(timestamp)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user