Merge pull request #11019 from filipefurtad0/flaky_cache_spec

Clears cache around examples
This commit is contained in:
Maikel
2023-06-16 11:12:24 +10:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@@ -19,6 +19,11 @@ describe "Darkswarm data caching", caching: true do
}
let(:exchange) { order_cycle.exchanges.outgoing.where(receiver_id: distributor.id).first }
around do |example|
Rails.cache.clear
example.run
end
before do
exchange.variants << product.variants.first
end

View File

@@ -13,6 +13,11 @@ describe "Shops caching", caching: true do
create(:open_order_cycle, distributors: [distributor], coordinator: distributor)
}
around do |example|
Rails.cache.clear
example.run
end
describe "caching enterprises AMS data" do
it "caches data for all enterprises, with the provided options" do
visit shops_path