mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 23:42:04 +02:00
added dedicated registrant model
This commit is contained in:
parent
2ed9672eb5
commit
321e28b8c7
10 changed files with 40 additions and 14 deletions
|
@ -3,11 +3,11 @@ Fabricator(:domain) do
|
|||
valid_to Date.new(2014, 8, 7)
|
||||
period 1
|
||||
period_unit 'y'
|
||||
registrant(fabricator: :contact)
|
||||
registrant(fabricator: :registrant)
|
||||
nameservers(count: 3)
|
||||
admin_domain_contacts(count: 1) { Fabricate(:admin_domain_contact) }
|
||||
tech_domain_contacts(count: 1) { Fabricate(:tech_domain_contact) }
|
||||
registrar
|
||||
registrar { Registrar.find_by_code('FIXED') }
|
||||
auth_info '98oiewslkfkd'
|
||||
end
|
||||
|
||||
|
|
18
spec/fabricators/registrant_fabricator.rb
Normal file
18
spec/fabricators/registrant_fabricator.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
Fabricator(:registrant) do
|
||||
registrar { Registrar.find_by_code('FIXED') }
|
||||
code { sequence(:code) { |i| "REGISTRANT#{Faker::Number.number(8)}#{i}" } }
|
||||
auth_info 'password'
|
||||
name { sequence(:name) { |i| "REGISTRANT #{Faker::Name.name}#{i}" } }
|
||||
phone '+372.12345678'
|
||||
email Faker::Internet.email
|
||||
street 'Short street 11'
|
||||
city 'Tallinn'
|
||||
zip '11111'
|
||||
country_code 'EE'
|
||||
ident '37605030299'
|
||||
ident_type 'priv'
|
||||
ident_country_code 'EE'
|
||||
# rubocop: disable Style/SymbolProc
|
||||
after_validation { |c| c.disable_generate_auth_info! }
|
||||
# rubocop: enamble Style/SymbolProc
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue