Files
openfoodnetwork/spec/models/inventory_item_spec.rb
2016-03-09 14:07:04 +11:00

17 lines
395 B
Ruby

require 'spec_helper'
require 'open_food_network/products_cache'
describe InventoryItem do
describe "caching" do
let(:ii) { create(:inventory_item) }
it "refreshes the products cache on save" do
expect(OpenFoodNetwork::ProductsCache).to receive(:inventory_item_changed).with(ii)
ii.visible = false
ii.save
end
# Inventory items are not destroyed
end
end