Use the Ruby 1.8 hash syntax.

Yes we still support Ruby 1.8 😢

Conflicts:
	Gemfile.lock
This commit is contained in:
Rafael Mendonça França 2013-01-28 13:21:44 -02:00
parent 1a8a252770
commit 87922e6ea2
4 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ group :test do
gem "omniauth-facebook"
gem "omniauth-openid", "~> 1.0.1"
gem "webrat", "0.7.2", :require => false
gem "mocha", :require => false
gem "mocha", "~> 0.10.0", :require => false
platforms :mri_18 do
gem "ruby-debug", ">= 0.10.3"

View File

@ -107,7 +107,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

View File

@ -407,7 +407,7 @@ class AuthenticationOthersTest < ActionController::IntegrationTest
test 'sign in stub in xml format' do
get new_user_session_path(:format => 'xml')
assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<user>\n <email></email>\n <password nil=\"true\"></password>\n</user>\n", response.body
assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<user>\n <email></email>\n <password nil=\"true\"/>\n</user>\n", response.body
end
test 'sign in stub in json format' do

View File

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