mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 11:19:39 +02:00
parent
39d7c6ad1d
commit
ad0220088a
30 changed files with 697 additions and 59 deletions
5
spec/factories/admin_domain_contact.rb
Normal file
5
spec/factories/admin_domain_contact.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
FactoryGirl.define do
|
||||
factory :admin_domain_contact, parent: :domain_contact, class: AdminDomainContact do
|
||||
|
||||
end
|
||||
end
|
16
spec/factories/contact.rb
Normal file
16
spec/factories/contact.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
FactoryGirl.define do
|
||||
factory :contact do
|
||||
name 'test'
|
||||
sequence(:code) { |n| "test#{n}" }
|
||||
phone '+123.456789'
|
||||
email 'test@test.com'
|
||||
street 'test'
|
||||
city 'test'
|
||||
zip 12345
|
||||
country_code 'EE'
|
||||
ident '37605030299'
|
||||
ident_type 'priv'
|
||||
ident_country_code 'EE'
|
||||
registrar
|
||||
end
|
||||
end
|
15
spec/factories/dnskey.rb
Normal file
15
spec/factories/dnskey.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
FactoryGirl.define do
|
||||
factory :dnskey do
|
||||
alg Dnskey::ALGORITHMS.first
|
||||
flags Dnskey::FLAGS.first
|
||||
protocol Dnskey::PROTOCOLS.first
|
||||
ds_digest_type 2
|
||||
domain
|
||||
public_key 'AwEAAaOf5+lz3ftsL+0CCvfJbhUF/NVsNh8BKo61oYs5fXVbuWDiH872 '\
|
||||
'LC8uKDO92TJy7Q4TF9XMAKMMlf1GMAxlRspD749SOCTN00sqfWx1OMTu '\
|
||||
'a28L1PerwHq7665oDJDKqR71btcGqyLKhe2QDvCdA0mENimF1NudX1BJ '\
|
||||
'DDFi6oOZ0xE/0CuveB64I3ree7nCrwLwNs56kXC4LYoX3XdkOMKiJLL/ '\
|
||||
'MAhcxXa60CdZLoRtTEW3z8/oBq4hEAYMCNclpbd6y/exScwBxFTdUfFk '\
|
||||
'KsdNcmvai1lyk9vna0WQrtpYpHKMXvY9LFHaJxCOLR4umfeQ42RuTd82 lqfU6ClMeXs='
|
||||
end
|
||||
end
|
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
|
5
spec/factories/domain_contact.rb
Normal file
5
spec/factories/domain_contact.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
FactoryGirl.define do
|
||||
factory :domain_contact do
|
||||
contact
|
||||
end
|
||||
end
|
6
spec/factories/nameserver.rb
Normal file
6
spec/factories/nameserver.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :nameserver do
|
||||
sequence(:hostname) { |n| "ns.test#{n}.ee" }
|
||||
ipv4 '192.168.1.1'
|
||||
end
|
||||
end
|
5
spec/factories/registrant.rb
Normal file
5
spec/factories/registrant.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
FactoryGirl.define do
|
||||
factory :registrant, parent: :contact, class: Registrant do
|
||||
name 'test'
|
||||
end
|
||||
end
|
13
spec/factories/registrar.rb
Normal file
13
spec/factories/registrar.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
FactoryGirl.define do
|
||||
factory :registrar do
|
||||
sequence(:name) { |n| "test#{n}" }
|
||||
sequence(:code) { |n| "test#{n}" }
|
||||
sequence(:reg_no) { |n| "test#{n}" }
|
||||
street 'test'
|
||||
city 'test'
|
||||
state 'test'
|
||||
zip 'test'
|
||||
email 'test@test.com'
|
||||
country_code 'EE'
|
||||
end
|
||||
end
|
5
spec/factories/tech_domain_contact.rb
Normal file
5
spec/factories/tech_domain_contact.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
FactoryGirl.define do
|
||||
factory :tech_domain_contact, parent: :domain_contact, class: TechDomainContact do
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue