Merge branch 'master' into api-log

Conflicts:
	app/helpers/epp/contacts_helper.rb
This commit is contained in:
Martin Lensment 2015-01-13 16:29:37 +02:00
commit fcc5ae1f23
13 changed files with 204 additions and 148 deletions

View file

@ -18,11 +18,11 @@ describe Contact do
end
it 'validates birthday' do
invalid = [ '123' '12/12/2012', 'aaaa', '12/12/12', '02-11-1999' ]
invalid = ['123' '12/12/2012', 'aaaa', '12/12/12', '02-11-1999']
invalid.each do |date|
expect(Fabricate.build(:contact, ident_type: 'birthday', ident: date).valid?).to be false
end
valid = [ '2012-12-11', '1990-02-16' ]
valid = ['2012-12-11', '1990-02-16']
valid.each do |date|
expect(Fabricate.build(:contact, ident_type: 'birthday', ident: date).valid?).to be true
end

View file

@ -14,7 +14,7 @@ describe Dnskey do
dk.generate_digest
expect(dk.ds_digest).to eq('0B62D1BC64EFD1EE652FB102BDF1011BF514CCD9A1A0CFB7472AEA3B01F38C92')
expect(dk.ds_key_tag).to eq(30607)
expect(dk.ds_key_tag).to eq('30607')
end
it 'generates correct DS digest and DS key tag for emta.ee' do
@ -37,6 +37,6 @@ describe Dnskey do
dk.save
expect(dk.ds_digest).to eq('D7045D3C2EF7332409A132D935C8E2834A2AAB769B35BC370FA68C9445398288')
expect(dk.ds_key_tag).to eq(31051)
expect(dk.ds_key_tag).to eq('31051')
end
end

View file

@ -48,7 +48,6 @@ describe Domain do
d = Domain.new
expect(d.valid?).to be false
expect(d.errors.messages).to match_array({
period: ['is not a number'],
owner_contact: ['Registrant is missing'],
admin_contacts: ['Admin contacts count must be between 1 - infinity'],
nameservers: ['Nameservers count must be between 2-11'],

View file

@ -193,9 +193,11 @@ module Epp
}
],
registrant: { value: 'jd1234' },
contact: { value: 'sh8013', attrs: { type: 'admin' } },
contact: { value: 'sh8013', attrs: { type: 'tech' } },
contact: { value: 'sh801333', attrs: { type: 'tech' } },
_anonymus: [
{ contact: { value: 'sh8013', attrs: { type: 'admin' } } },
{ contact: { value: 'sh8013', attrs: { type: 'tech' } } },
{ contact: { value: 'sh801333', attrs: { type: 'tech' } } }
],
authInfo: {
pw: {
value: '2fooBAR'
@ -235,9 +237,11 @@ module Epp
}
],
registrant: { value: 'jd1234' },
contact: { value: 'sh8013', attrs: { type: 'admin' } },
contact: { value: 'sh8013', attrs: { type: 'tech' } },
contact: { value: 'sh801333', attrs: { type: 'tech' } },
_anonymus: [
{ contact: { value: 'sh8013', attrs: { type: 'admin' } } },
{ contact: { value: 'sh8013', attrs: { type: 'tech' } } },
{ contact: { value: 'sh801333', attrs: { type: 'tech' } } }
],
authInfo: {
pw: {
value: '2fooBAR'