Created
June 20, 2010 21:18
-
-
Save edavis10/446122 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
should "select the exact matching user first" do | |
case_sensitive_user = User.generate_with_protected!(:login => 'changed', :password => 'admin', :password_confirmation => 'admin') | |
# bypass validations to make it appear like existing data | |
case_sensitive_user.update_attribute(:login, 'ADMIN') | |
user = User.try_to_login("ADMIN", "admin") | |
assert_kind_of User, user | |
assert_equal "ADMIN", user.login | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment