push
0 of 1 new or added line in 1 file covered. (0.0%)
6593 existing lines in 123 files now uncovered.2413 of 15669 relevant lines covered (15.4%)
1.24 hits per line
UNCOV
1
|
class PasswordReset < ApplicationRecord |
× |
UNCOV
2
|
validates :user_email, presence: true |
× |
3 |
# attr_accessible :user_email, :token
|
|
UNCOV
4
|
def self.save_token(user, token) |
× |
UNCOV
5
|
password_reset = PasswordReset.find_by(user_email: user.email) |
× |
UNCOV
6
|
if password_reset
|
× |
UNCOV
7
|
password_reset.token = Digest::SHA1.hexdigest(token) |
× |
UNCOV
8
|
password_reset.save! |
× |
UNCOV
9
|
else
|
× |
UNCOV
10
|
PasswordReset.create(user_email: user.email, token: Digest::SHA1.hexdigest(token)) |
× |
UNCOV
11
|
end
|
× |
UNCOV
12
|
end
|
× |
UNCOV
13
|
end
|
× |