mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix spec that requires preference persistence
This commit is contained in:
@@ -10,6 +10,7 @@ class Enterprise < ActiveRecord::Base
|
||||
# This is hopefully a temporary measure, pending the arrival of multiple named inventories
|
||||
# for shops. We need this here to allow hubs to restrict visible variants to only those in
|
||||
# their inventory if they so choose
|
||||
# TODO: delegate this to a separate model instead of abusing Preferences.
|
||||
preference :product_selection_from_inventory_only, :boolean, default: false
|
||||
|
||||
devise :confirmable, reconfirmable: true, confirmation_keys: [ :id, :email ]
|
||||
|
||||
@@ -273,6 +273,10 @@ feature %q{
|
||||
before do
|
||||
Delayed::Job.destroy_all
|
||||
quick_login_as_admin
|
||||
|
||||
# This test relies on preference persistence, so we'll turn it on for this spec only.
|
||||
# It will be turned off again automatically by reset_spree_preferences in spec_helper.
|
||||
Spree::Preferences::Store.instance.persistence = true
|
||||
end
|
||||
|
||||
it "refreshes the cache when I change what products appear on my shopfront" do
|
||||
|
||||
Reference in New Issue
Block a user