mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Fix all tests
This commit is contained in:
parent
9def6a7c27
commit
48710b41f7
4 changed files with 5 additions and 6 deletions
|
@ -1,13 +1,12 @@
|
||||||
module Epp::ContactsHelper
|
module Epp::ContactsHelper
|
||||||
def create_contact
|
def create_contact
|
||||||
ph = params_hash
|
ph = params_hash['epp']['command']['create']['create']
|
||||||
|
|
||||||
@contact = Contact.new(
|
@contact = Contact.new(
|
||||||
code: ph[:id],
|
code: ph[:id],
|
||||||
name: ph[:postalInfo][:name],
|
name: ph[:postalInfo][:name],
|
||||||
phone: ph[:voice],
|
phone: ph[:voice],
|
||||||
email: ph[:email],
|
email: ph[:email]
|
||||||
reg_no: ph[:ident]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@contact.addresses << Address.new(
|
@contact.addresses << Address.new(
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe 'EPP Contact', epp: true do
|
||||||
response = epp_request('contacts/create.xml')
|
response = epp_request('contacts/create.xml')
|
||||||
expect(response[:result_code]).to eq('1000')
|
expect(response[:result_code]).to eq('1000')
|
||||||
expect(response[:msg]).to eq('Command completed successfully')
|
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)
|
expect(Contact.count).to eq(1)
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<contact:city>Dulles</contact:city>
|
<contact:city>Dulles</contact:city>
|
||||||
<contact:sp>VA</contact:sp>
|
<contact:sp>VA</contact:sp>
|
||||||
<contact:pc>20166-6503</contact:pc>
|
<contact:pc>20166-6503</contact:pc>
|
||||||
<contact:cc>US</contact:cc>
|
<contact:cc>EE</contact:cc>
|
||||||
</contact:addr>
|
</contact:addr>
|
||||||
</contact:postalInfo>
|
</contact:postalInfo>
|
||||||
<contact:voice x="1234">+1.7035555555</contact:voice>
|
<contact:voice x="1234">+1.7035555555</contact:voice>
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe 'EPP Session', epp: true do
|
||||||
response = epp_plain_request('domains/create.xml')
|
response = epp_plain_request('domains/create.xml')
|
||||||
expect(response[:result_code]).to eq('2002')
|
expect(response[:result_code]).to eq('2002')
|
||||||
expect(response[:msg]).to eq('You need to login first.')
|
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
|
end
|
||||||
|
|
||||||
context 'with valid user' do
|
context 'with valid user' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue