mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
rubocop autocorret to get tests green
This commit is contained in:
parent
c0caf53878
commit
2d6ed7fa45
24 changed files with 105 additions and 112 deletions
|
@ -33,7 +33,7 @@ describe 'EPP Contact', epp: true do
|
|||
|
||||
expect(response[:result_code]).to eq('1000')
|
||||
expect(response[:msg]).to eq('Command completed successfully')
|
||||
#expect(response[:clTRID]).to eq('ABC-12345')
|
||||
# expect(response[:clTRID]).to eq('ABC-12345')
|
||||
expect(Contact.first.created_by_id).to eq 2
|
||||
expect(Contact.first.updated_by_id).to eq nil
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ describe 'EPP Domain', epp: true do
|
|||
xml = domain_create_xml({
|
||||
ns: [
|
||||
{ hostObj: { value: 'invalid1-' } },
|
||||
{ hostObj: { value: '-invalid2' } },
|
||||
{ hostObj: { value: '-invalid2' } }
|
||||
]
|
||||
|
||||
})
|
||||
|
@ -314,7 +314,7 @@ describe 'EPP Domain', epp: true do
|
|||
|
||||
it 'does not create a domain with invalid period' do
|
||||
xml = domain_create_xml({
|
||||
period: {value: '367', attrs: { unit: 'd' } }
|
||||
period: { value: '367', attrs: { unit: 'd' } }
|
||||
})
|
||||
|
||||
response = epp_request(xml, :xml)
|
||||
|
@ -420,26 +420,26 @@ describe 'EPP Domain', epp: true do
|
|||
end
|
||||
|
||||
it 'does not create a domain with two identical dnskeys' do
|
||||
xml = domain_create_xml({
|
||||
dnssec: [
|
||||
{
|
||||
dnskey: {
|
||||
flags: { value: '257' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '3' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
},
|
||||
{
|
||||
dnskey: {
|
||||
flags: { value: '0' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '5' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
xml = domain_create_xml({
|
||||
dnssec: [
|
||||
{
|
||||
dnskey: {
|
||||
flags: { value: '257' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '3' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
},
|
||||
{
|
||||
dnskey: {
|
||||
flags: { value: '0' },
|
||||
protocol: { value: '3' },
|
||||
alg: { value: '5' },
|
||||
pubKey: { value: '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f' }
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
response = epp_request(xml, :xml)
|
||||
|
||||
|
@ -580,12 +580,12 @@ describe 'EPP Domain', epp: true do
|
|||
expect(inf_data.css('status').first[:s]).to eq('clientHold')
|
||||
expect(inf_data.css('registrant').text).to eq(d.owner_contact_code)
|
||||
|
||||
admin_contacts_from_request = inf_data.css('contact[type="admin"]').map { |x| x.text }
|
||||
admin_contacts_from_request = inf_data.css('contact[type="admin"]').map(&:text)
|
||||
admin_contacts_existing = d.admin_contacts.pluck(:code)
|
||||
|
||||
expect(admin_contacts_from_request).to eq(admin_contacts_existing)
|
||||
|
||||
hosts_from_request = inf_data.css('hostObj').map { |x| x.text }
|
||||
hosts_from_request = inf_data.css('hostObj').map(&:text)
|
||||
hosts_existing = d.nameservers.where(ipv4: nil).pluck(:hostname)
|
||||
|
||||
expect(hosts_from_request).to eq(hosts_existing)
|
||||
|
|
|
@ -72,16 +72,16 @@ describe 'EPP Helper', epp: true do
|
|||
|
||||
xml = domain_create_xml({
|
||||
name: { value: 'one.ee' },
|
||||
period: {value: '345', attrs: { unit: 'd' } },
|
||||
period: { value: '345', attrs: { unit: 'd' } },
|
||||
ns: [
|
||||
{ hostObj: {value: 'ns1.test.net' } },
|
||||
{ hostObj: {value: 'ns2.test.net' } }
|
||||
{ hostObj: { value: 'ns1.test.net' } },
|
||||
{ hostObj: { value: 'ns2.test.net' } }
|
||||
],
|
||||
registrant: { value: '32fsdaf' },
|
||||
_other: [
|
||||
{ contact: {value: '2323rafaf', attrs: { type: 'admin' } } },
|
||||
{ contact: {value: '3dgxx', attrs: { type: 'tech' } } },
|
||||
{ contact: {value: '345xxv', attrs: { type: 'tech' } } }
|
||||
{ contact: { value: '2323rafaf', attrs: { type: 'admin' } } },
|
||||
{ contact: { value: '3dgxx', attrs: { type: 'tech' } } },
|
||||
{ contact: { value: '345xxv', attrs: { type: 'tech' } } }
|
||||
]
|
||||
})
|
||||
|
||||
|
@ -452,7 +452,6 @@ describe 'EPP Helper', epp: true do
|
|||
generated = Nokogiri::XML(domain_delete_xml).to_s.squish
|
||||
expect(generated).to eq(expected)
|
||||
|
||||
|
||||
expected = Nokogiri::XML('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue