Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

fix Menu Item specs

Łukasz Adamczyk0e339954122f
diff --git a/core/spec/models/spree/menu_item_spec.rb b/core/spec/models/spree/menu_item_spec.rb
index 232139b6e7..9d6ac9cb1c 100644
--- a/core/spec/models/spree/menu_item_spec.rb
+++ b/core/spec/models/spree/menu_item_spec.rb
@@ -179,7 +179,11 @@ describe Spree::MenuItem, type: :model do
describe 'touch menu and store' do
let(:menu_item) { build(:menu_item, menu: menu) }
- it { expect { menu_item.save! }.to change(menu, :updated_at) }
+ it 'touches menu' do
+ expect(menu).to receive(:touch)
+ menu_item.save!
+ end
+
it { expect { menu_item.save! }.to change(store, :updated_at) }
end
end