mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Fix some rubocops errors
This commit is contained in:
parent
68b5391f06
commit
55aa7743b0
8 changed files with 66 additions and 65 deletions
|
@ -12,6 +12,7 @@ describe 'EPP Contact', epp: true do
|
|||
Fabricate(:epp_user, username: 'zone', registrar: zone)
|
||||
Fabricate(:epp_user, username: 'elkdata', registrar: elkdata)
|
||||
Fabricate(:domain_validation_setting_group)
|
||||
Fabricate(:dnskeys_setting_group)
|
||||
end
|
||||
|
||||
context 'create command' do
|
||||
|
@ -145,7 +146,7 @@ describe 'EPP Contact', epp: true do
|
|||
|
||||
it 'returns phone and email error' do
|
||||
Fabricate(
|
||||
:contact,
|
||||
:contact,
|
||||
registrar: zone,
|
||||
created_by_id: 1,
|
||||
email: 'not_updated@test.test',
|
||||
|
@ -203,9 +204,9 @@ describe 'EPP Contact', epp: true do
|
|||
:domain,
|
||||
registrar: zone,
|
||||
owner_contact: Fabricate(
|
||||
:contact,
|
||||
code: 'dwa1234',
|
||||
created_by_id: zone.id,
|
||||
:contact,
|
||||
code: 'dwa1234',
|
||||
created_by_id: zone.id,
|
||||
registrar: zone)
|
||||
)
|
||||
expect(Domain.first.owner_contact.address.present?).to be true
|
||||
|
|
|
@ -400,33 +400,33 @@ describe 'EPP Domain', epp: true do
|
|||
|
||||
it 'does not create a domain when dnskeys are invalid' do
|
||||
|
||||
xml = domain_create_xml({}, {
|
||||
_other: [
|
||||
{ keyData: {
|
||||
flags: { value: '250' },
|
||||
protocol: { value: '4' },
|
||||
alg: { value: '9' },
|
||||
pubKey: { value: 'AwEAAddt2AkLfYGKgiEZB5SmIF8EvrjxNMH6HtxWEA4RJ9Ao6LCWheg8' }
|
||||
}
|
||||
},
|
||||
{
|
||||
keyData: {
|
||||
flags: { value: '1' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '10' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
},
|
||||
{
|
||||
keyData: {
|
||||
flags: { value: '256' },
|
||||
protocol: { value: '5' },
|
||||
alg: { value: '254' },
|
||||
pubKey: { value: '' }
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
xml = domain_create_xml({}, {
|
||||
_other: [
|
||||
{ keyData: {
|
||||
flags: { value: '250' },
|
||||
protocol: { value: '4' },
|
||||
alg: { value: '9' },
|
||||
pubKey: { value: 'AwEAAddt2AkLfYGKgiEZB5SmIF8EvrjxNMH6HtxWEA4RJ9Ao6LCWheg8' }
|
||||
}
|
||||
},
|
||||
{
|
||||
keyData: {
|
||||
flags: { value: '1' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '10' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
},
|
||||
{
|
||||
keyData: {
|
||||
flags: { value: '256' },
|
||||
protocol: { value: '5' },
|
||||
alg: { value: '254' },
|
||||
pubKey: { value: '' }
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
response = epp_request(xml, :xml)
|
||||
|
||||
|
@ -452,24 +452,24 @@ describe 'EPP Domain', epp: true do
|
|||
end
|
||||
|
||||
it 'does not create a domain with two identical dnskeys' do
|
||||
xml = domain_create_xml({}, {
|
||||
_other: [
|
||||
{ keyData: {
|
||||
flags: { value: '257' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '3' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
},
|
||||
{
|
||||
keyData: {
|
||||
flags: { value: '0' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '5' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
}]
|
||||
})
|
||||
xml = domain_create_xml({}, {
|
||||
_other: [
|
||||
{ keyData: {
|
||||
flags: { value: '257' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '3' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
},
|
||||
{
|
||||
keyData: {
|
||||
flags: { value: '0' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '5' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
}]
|
||||
})
|
||||
|
||||
response = epp_request(xml, :xml)
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ describe Contact, '#relations_with_domain?' do
|
|||
context 'with relation' do
|
||||
before(:each) do
|
||||
Fabricate(:domain_validation_setting_group)
|
||||
Fabricate(:dnskeys_setting_group)
|
||||
Fabricate(:domain)
|
||||
end
|
||||
|
||||
|
@ -74,8 +75,8 @@ end
|
|||
|
||||
describe Contact, '#up_id' do
|
||||
before(:each) do
|
||||
# Fabricate(:contact, code: 'asd12',
|
||||
# created_by: Fabricate(:epp_user),
|
||||
# Fabricate(:contact, code: 'asd12',
|
||||
# created_by: Fabricate(:epp_user),
|
||||
# updated_by: Fabricate(:epp_user), registrar: zone)
|
||||
@epp_user = Fabricate(:epp_user)
|
||||
@contact = Fabricate.build(:contact, code: 'asd12', created_by: @epp_user, updated_by: @epp_user)
|
||||
|
|
|
@ -10,7 +10,10 @@ describe Domain do
|
|||
it { should have_many(:dnskeys) }
|
||||
|
||||
context 'with sufficient settings' do
|
||||
before(:each) { Fabricate(:domain_validation_setting_group) }
|
||||
before(:each) do
|
||||
Fabricate(:domain_validation_setting_group)
|
||||
Fabricate(:dnskeys_setting_group)
|
||||
end
|
||||
|
||||
it 'validates domain name' do
|
||||
d = Fabricate(:domain)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue