mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-29 04:06:11 +01:00
get login, mobile and notes features passing
This commit is contained in:
parent
7c935652fb
commit
005723cb4f
52 changed files with 167 additions and 196 deletions
|
|
@ -13,7 +13,7 @@ Given /^the following user records with hash algorithm$/ do |table|
|
|||
algorithm = hash[:algorithm]
|
||||
hash.delete("algorithm")
|
||||
|
||||
user = Factory(:user, hash)
|
||||
user = FactoryGirl.create(:user, hash)
|
||||
|
||||
case algorithm
|
||||
when 'bcrypt'
|
||||
|
|
@ -22,7 +22,7 @@ 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.send(:write_attribute, :crypted_password, user.sha1(password))
|
||||
user.save
|
||||
user.reload
|
||||
user.crypted_password.should == user.sha1(password)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue