Skip to content

Instantly share code, notes, and snippets.

@edavis10
Created June 20, 2010 21:18
Show Gist options
  • Save edavis10/446122 to your computer and use it in GitHub Desktop.
Save edavis10/446122 to your computer and use it in GitHub Desktop.
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