Fix all tests

This commit is contained in:
Martin Lensment 2014-07-03 17:53:15 +03:00
parent 9def6a7c27
commit 48710b41f7
4 changed files with 5 additions and 6 deletions

View file

@ -1,13 +1,12 @@
module Epp::ContactsHelper
def create_contact
ph = params_hash
ph = params_hash['epp']['command']['create']['create']
@contact = Contact.new(
code: ph[:id],
name: ph[:postalInfo][:name],
phone: ph[:voice],
email: ph[:email],
reg_no: ph[:ident]
email: ph[:email]
)
@contact.addresses << Address.new(

View file

@ -11,7 +11,7 @@ describe 'EPP Contact', epp: true do
response = epp_request('contacts/create.xml')
expect(response[:result_code]).to eq('1000')
expect(response[:msg]).to eq('Command completed successfully')
expect(response[:clTRID]).to eq('neka005#10-02-08at13:51:37')
expect(response[:clTRID]).to eq('ABC-12345')
expect(Contact.count).to eq(1)
end

View file

@ -14,7 +14,7 @@
<contact:city>Dulles</contact:city>
<contact:sp>VA</contact:sp>
<contact:pc>20166-6503</contact:pc>
<contact:cc>US</contact:cc>
<contact:cc>EE</contact:cc>
</contact:addr>
</contact:postalInfo>
<contact:voice x="1234">+1.7035555555</contact:voice>

View file

@ -31,7 +31,7 @@ describe 'EPP Session', epp: true do
response = epp_plain_request('domains/create.xml')
expect(response[:result_code]).to eq('2002')
expect(response[:msg]).to eq('You need to login first.')
expect(response[:clTRID]).to eq('dpbx005#10-01-29at19:21:47')
expect(response[:clTRID]).to eq('ABC-12345')
end
context 'with valid user' do