mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 17:23:34 +02:00
parent
4e6d576b67
commit
658bf6dda2
3 changed files with 2 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
class Contact::Ident::NationalIDValidator < ActiveModel::EachValidator
|
||||
class Contact::Ident::NationalIdValidator < ActiveModel::EachValidator
|
||||
def self.country_specific_validations
|
||||
{
|
||||
Country.new('EE') => proc { |code| Isikukood.new(code).valid? },
|
||||
|
|
|
@ -12,5 +12,4 @@
|
|||
|
||||
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
inflect.acronym 'DNS'
|
||||
inflect.acronym 'ID'
|
||||
end
|
||||
|
|
|
@ -117,7 +117,7 @@ RSpec.describe 'EPP contact:create' do
|
|||
Country.new('DE') => proc { false },
|
||||
}
|
||||
|
||||
allow(Contact::Ident::NationalIDValidator).to receive(:country_specific_validations)
|
||||
allow(Contact::Ident::NationalIdValidator).to receive(:country_specific_validations)
|
||||
.and_return(country_specific_validations)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue