Skip to content

Commit

Permalink
Fix autoload issue on Solidus v3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Tapia committed Jul 22, 2022
1 parent bfbf616 commit 53ebfeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
11 changes: 1 addition & 10 deletions app/models/spree/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
module Spree
class User < Spree::Base
include UserMethods
include Spree::SoftDeletable

devise :database_authenticatable, :registerable, :recoverable,
:rememberable, :trackable, :validatable, :encryptable
devise :confirmable if Spree::Auth::Config[:confirmable]

if defined?(Spree::SoftDeletable)
include Spree::SoftDeletable
else
acts_as_paranoid
include Spree::ParanoiaDeprecations

include Discard::Model
self.discard_column = :deleted_at
end

after_destroy :scramble_email_and_password
after_discard :scramble_email_and_password

Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/spree/user_registrations_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
let(:password_confirmation) { 'foobar123' }

subject do
post(:create, {
post(:create,
params: {
spree_user: {
email: '[email protected]',
password: 'foobar123',
password_confirmation: password_confirmation
}
}
})
)
end

context 'when user created successfuly' do
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/spree/user_sessions_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
let(:password) { 'secret' }

subject do
post(:create, {
post(:create,
params: {
spree_user: {
email: user.email,
password: password
},
format: format
}
})
)
end

context "when using correct login information" do
Expand Down

0 comments on commit 53ebfeb

Please sign in to comment.