Files
devise/test/models/authenticatable_test.rb
Rafael Mendonça França 87922e6ea2 Use the Ruby 1.8 hash syntax.
Yes we still support Ruby 1.8 😢

Conflicts:
	Gemfile.lock
2013-01-28 13:43:16 -02:00

10 lines
451 B
Ruby

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
end
end