mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 07:38:07 -05:00
Use the Ruby 1.8 hash syntax.
Yes we still support Ruby 1.8 😢
Conflicts:
Gemfile.lock
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
devise (2.0.4)
|
||||
devise (2.0.5)
|
||||
bcrypt-ruby (~> 3.0)
|
||||
orm_adapter (~> 0.0.3)
|
||||
railties (~> 3.1)
|
||||
|
||||
@@ -155,7 +155,7 @@ module Devise
|
||||
# Example:
|
||||
#
|
||||
# def self.find_for_authentication(tainted_conditions)
|
||||
# find_first_by_auth_conditions(tainted_conditions, active: true)
|
||||
# find_first_by_auth_conditions(tainted_conditions, :active => true)
|
||||
# end
|
||||
#
|
||||
# Finally, notice that Devise also queries for users in other scenarios
|
||||
|
||||
@@ -2,8 +2,8 @@ require 'test_helper'
|
||||
|
||||
class AuthenticatableTest < ActiveSupport::TestCase
|
||||
test 'find_first_by_auth_conditions allows custom filtering parameters' do
|
||||
user = User.create!(email: "example@example.com", password: "123456")
|
||||
assert_equal User.find_first_by_auth_conditions({ email: "example@example.com" }), user
|
||||
assert_equal User.find_first_by_auth_conditions({ email: "example@example.com" }, id: user.id + 1), nil
|
||||
user = User.create!(:email => "example@example.com", :password => "123456")
|
||||
assert_equal User.find_first_by_auth_conditions({ :email => "example@example.com" }), user
|
||||
assert_equal User.find_first_by_auth_conditions({ :email => "example@example.com" }, :id => user.id + 1), nil
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user