Merge pull request #2993 from Matt-Yorkley/user_class

Deal with failing Spree::LegacyUser test
This commit is contained in:
Maikel
2018-11-09 10:21:31 +11:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

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

View File

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