Sha256: ee749f8fa629f09a823d76324fda6b8631c02e1ed5eb09f13eb70407f7ac7482

Contents?: true

Size: 566 Bytes

Versions: 8

Compression:

Stored size: 566 Bytes

Contents

require 'test_helper'

class AuthenticatableTest < ActiveSupport::TestCase
  test 'required_fields should be an empty array' do
    assert_equal Devise::Models::Validatable.required_fields(User), []
  end

  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_nil User.find_first_by_auth_conditions({ email: "example@example.com" }, id: user.id.to_s.next)
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
devbootsrap-0.0.7 test/models/authenticatable_test.rb
devbootsrap-0.0.6 test/models/authenticatable_test.rb
devbootsrap-0.0.5 test/models/authenticatable_test.rb
devbootsrap-0.0.4 test/models/authenticatable_test.rb
devbootsrap-0.0.3 test/models/authenticatable_test.rb
devbootsrap-0.0.2 test/models/authenticatable_test.rb
devbootsrap-0.0.1 test/models/authenticatable_test.rb
devise-3.2.4 test/models/authenticatable_test.rb