mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 07:18:14 -05:00
Tests that should no longer exclude Mongoid
This commit is contained in:
@@ -42,18 +42,16 @@ class ActiveRecordTest < ActiveSupport::TestCase
|
||||
assert_include_modules Admin, :database_authenticatable, :registerable, :timeoutable, :recoverable, :lockable, :rememberable, :encryptable
|
||||
end
|
||||
|
||||
if DEVISE_ORM == :active_record
|
||||
test 'validations options are not applied to late' do
|
||||
validators = WithValidation.validators_on :password
|
||||
length = validators.find { |v| v.kind == :length }
|
||||
assert_equal 2, length.options[:minimum]
|
||||
assert_equal 6, length.options[:maximum]
|
||||
end
|
||||
test 'validations options are not applied too late' do
|
||||
validators = WithValidation.validators_on :password
|
||||
length = validators.find { |v| v.kind == :length }
|
||||
assert_equal 2, length.options[:minimum]
|
||||
assert_equal 6, length.options[:maximum]
|
||||
end
|
||||
|
||||
test 'validations are applied just once' do
|
||||
validators = Several.validators_on :password
|
||||
assert_equal 1, validators.select{ |v| v.kind == :length }.length
|
||||
end
|
||||
test 'validations are applied just once' do
|
||||
validators = Several.validators_on :password
|
||||
assert_equal 1, validators.select{ |v| v.kind == :length }.length
|
||||
end
|
||||
|
||||
test 'chosen modules are inheritable' do
|
||||
|
||||
Reference in New Issue
Block a user