get login, mobile and notes features passing

This commit is contained in:
Reinier Balt 2012-05-12 13:37:36 +02:00
parent 7c935652fb
commit 005723cb4f
52 changed files with 167 additions and 196 deletions

View file

@ -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)