Tests that should no longer exclude Mongoid

This commit is contained in:
Ches Martin
2011-08-06 19:28:19 +07:00
parent 6448490de5
commit ccbf26be0a
2 changed files with 11 additions and 13 deletions

View File

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