Guest User

Untitled

a guest
May 28th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. should "select the exact matching user first" do
  2. case_sensitive_user = User.generate_with_protected!(:login => 'changed', :password => 'admin', :password_confirmation => 'admin')
  3. # bypass validations to make it appear like existing data
  4. case_sensitive_user.update_attribute(:login, 'ADMIN')
  5.  
  6. user = User.try_to_login("ADMIN", "admin")
  7. assert_kind_of User, user
  8. assert_equal "ADMIN", user.login
  9.  
  10. end
Add Comment
Please, Sign In to add comment