mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
parent
39d7c6ad1d
commit
ad0220088a
30 changed files with 697 additions and 59 deletions
15
spec/factories/domain.rb
Normal file
15
spec/factories/domain.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
FactoryGirl.define do
|
||||
factory :domain do
|
||||
sequence(:name) { |n| "test#{n}.com" }
|
||||
period 1
|
||||
period_unit 'y' # Year
|
||||
registrar
|
||||
registrant
|
||||
|
||||
after :build do |domain|
|
||||
domain.nameservers << FactoryGirl.build_pair(:nameserver)
|
||||
domain.admin_domain_contacts << FactoryGirl.build(:admin_domain_contact)
|
||||
domain.tech_domain_contacts << FactoryGirl.build(:tech_domain_contact)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue