We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1389785 + d1ce68e commit a78264aCopy full SHA for a78264a
2 files changed
app/models/spree/user.rb
@@ -46,6 +46,8 @@ def set_login
46
end
47
48
def scramble_email_and_password
49
+ return true if destroyed?
50
+
51
self.email = SecureRandom.uuid + "@example.net"
52
self.login = email
53
self.password = SecureRandom.hex(8)
spec/models/user_spec.rb
@@ -78,6 +78,15 @@
78
79
80
81
+ describe '#really_destroy!' do
82
+ let(:user) { create(:user) }
83
84
+ it 'removes the record from the database' do
85
+ user.really_destroy!
86
+ expect(Spree::User.with_deleted.exists?(id: user.id)).to eql false
87
+ end
88
89
90
describe "confirmable" do
91
it "is confirmable if the confirmable option is enabled" do
92
set_confirmable_option(true)
0 commit comments