mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
Merge pull request #2993 from Matt-Yorkley/user_class
Deal with failing Spree::LegacyUser test
This commit is contained in:
@@ -24,6 +24,9 @@ Spree.config do |config|
|
||||
config.order_updater_decorator = OrderUpdater
|
||||
end
|
||||
|
||||
# Spree 2.0 recommends explicitly setting this here when using spree_auth_devise
|
||||
Spree.user_class = 'Spree::User'
|
||||
|
||||
# Don't log users out when setting a new password
|
||||
Spree::Auth::Config[:signout_after_password_change] = false
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ module Spree
|
||||
user.stub(:has_spree_role?).with("admin").and_return(false)
|
||||
user.stub(:enterprises) { [] }
|
||||
user.stub(:owned_groups) { [] }
|
||||
user.stub(:spree_api_key) { "spree_api_key" }
|
||||
user
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user