Fix spec that requires preference persistence

This commit is contained in:
Rob Harrington
2017-10-14 16:53:07 +11:00
parent efa71c4ac8
commit cd6d7c76f6
2 changed files with 5 additions and 0 deletions

View File

@@ -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 ]

View File

@@ -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