mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
FIx failing test due to refactoring of code
This commit is contained in:
parent
5f5a2045b5
commit
896e496f83
1 changed files with 2 additions and 2 deletions
|
|
@ -22,10 +22,10 @@ Given /^the following user records with hash algorithm$/ do |table|
|
|||
BCrypt::Password.new(user.crypted_password).should == password
|
||||
when 'sha1'
|
||||
user.password = user.password_confirmation = nil
|
||||
user.write_attribute :crypted_password, User.sha1( password )
|
||||
user.write_attribute :crypted_password, Digest::SHA1.hexdigest("#{Tracks::Config.salt}--#{password}--")
|
||||
user.save
|
||||
user.reload
|
||||
user.crypted_password.should == User.sha1(password)
|
||||
user.crypted_password.should == Digest::SHA1.hexdigest("#{Tracks::Config.salt}--#{password}--")
|
||||
else
|
||||
raise "Unknown hashing algorithm: #{algorithm}"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue