nominet-epp 0.0.12 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/.travis.yml +14 -0
- data/.yardopts +8 -2
- data/Gemfile +22 -0
- data/Gemfile.lock +64 -0
- data/HISTORY.md +78 -0
- data/LICENSE +1 -1
- data/README.md +23 -0
- data/Rakefile +2 -37
- data/gemfiles/Gemfile.ruby18 +13 -0
- data/lib/nominet-epp/client.rb +364 -0
- data/lib/nominet-epp/notification.rb +346 -0
- data/lib/nominet-epp/operations.rb +2 -7
- data/lib/nominet-epp/request.rb +165 -0
- data/lib/nominet-epp/requests/contact/check.rb +9 -0
- data/lib/nominet-epp/requests/contact/create.rb +60 -0
- data/lib/nominet-epp/requests/contact/delete.rb +9 -0
- data/lib/nominet-epp/requests/contact/info.rb +9 -0
- data/lib/nominet-epp/requests/contact/release.rb +33 -0
- data/lib/nominet-epp/requests/contact/update.rb +63 -0
- data/lib/nominet-epp/requests/custom/handshake.rb +36 -0
- data/lib/nominet-epp/requests/custom/list.rb +38 -0
- data/lib/nominet-epp/requests/custom/tag_list.rb +25 -0
- data/lib/nominet-epp/requests/domain/check.rb +98 -0
- data/lib/nominet-epp/requests/domain/create.rb +97 -0
- data/lib/nominet-epp/requests/domain/delete.rb +9 -0
- data/lib/nominet-epp/requests/domain/info.rb +9 -0
- data/lib/nominet-epp/requests/domain/release.rb +33 -0
- data/lib/nominet-epp/requests/domain/renew.rb +9 -0
- data/lib/nominet-epp/requests/domain/unrenew.rb +33 -0
- data/lib/nominet-epp/requests/domain/update.rb +134 -0
- data/lib/nominet-epp/requests/host/check.rb +9 -0
- data/lib/nominet-epp/requests/host/create.rb +9 -0
- data/lib/nominet-epp/requests/host/delete.rb +9 -0
- data/lib/nominet-epp/requests/host/info.rb +9 -0
- data/lib/nominet-epp/requests/host/update.rb +9 -0
- data/lib/nominet-epp/responses/contact/check_response.rb +10 -0
- data/lib/nominet-epp/responses/contact/create_response.rb +14 -0
- data/lib/nominet-epp/responses/contact/delete_response.rb +10 -0
- data/lib/nominet-epp/responses/contact/info_response.rb +89 -0
- data/lib/nominet-epp/responses/contact/release_response.rb +10 -0
- data/lib/nominet-epp/responses/contact/update_response.rb +10 -0
- data/lib/nominet-epp/responses/custom/handshake_response.rb +33 -0
- data/lib/nominet-epp/responses/custom/list_response.rb +29 -0
- data/lib/nominet-epp/responses/custom/tag_list_response.rb +37 -0
- data/lib/nominet-epp/responses/domain/check_response.rb +40 -0
- data/lib/nominet-epp/responses/domain/create_response.rb +10 -0
- data/lib/nominet-epp/responses/domain/delete_response.rb +10 -0
- data/lib/nominet-epp/responses/domain/info_response.rb +128 -0
- data/lib/nominet-epp/responses/domain/release_response.rb +10 -0
- data/lib/nominet-epp/responses/domain/renew_response.rb +10 -0
- data/lib/nominet-epp/responses/domain/unrenew_response.rb +26 -0
- data/lib/nominet-epp/responses/domain/update_response.rb +10 -0
- data/lib/nominet-epp/responses/host/check_response.rb +10 -0
- data/lib/nominet-epp/responses/host/create_response.rb +14 -0
- data/lib/nominet-epp/responses/host/delete_response.rb +10 -0
- data/lib/nominet-epp/responses/host/info_response.rb +14 -0
- data/lib/nominet-epp/responses/host/update_response.rb +10 -0
- data/lib/nominet-epp/responses/response.rb +27 -0
- data/lib/nominet-epp/version.rb +4 -0
- data/lib/nominet-epp.rb +60 -161
- data/nominet-epp.gemspec +15 -65
- data/test/helper.rb +57 -0
- data/test/notifications/test_contact_deleted_notification.rb +23 -0
- data/test/notifications/test_domain_cancelled_notification.rb +23 -0
- data/test/notifications/test_domains_released_notification.rb +34 -0
- data/test/notifications/test_domains_suspended_notification.rb +30 -0
- data/test/notifications/test_handshake_rejected_notification.rb +34 -0
- data/test/notifications/test_registrant_transfer_notification.rb +78 -0
- data/test/notifications/test_registrar_change_notification.rb +119 -0
- data/test/requests/contact/test_contact_check_request.rb +25 -0
- data/test/requests/contact/test_contact_create_request.rb +104 -0
- data/test/requests/contact/test_contact_delete_request.rb +20 -0
- data/test/requests/contact/test_contact_info_request.rb +20 -0
- data/test/requests/contact/test_contact_release_request.rb +29 -0
- data/test/requests/contact/test_contact_update_request.rb +111 -0
- data/test/requests/custom/test_custom_handshake_request.rb +42 -0
- data/test/requests/custom/test_custom_list_request.rb +44 -0
- data/test/requests/custom/test_custom_tag_list_request.rb +21 -0
- data/test/requests/domain/test_domain_check_request.rb +140 -0
- data/test/requests/domain/test_domain_create_request.rb +136 -0
- data/test/requests/domain/test_domain_delete_request.rb +20 -0
- data/test/requests/domain/test_domain_info_request.rb +20 -0
- data/test/requests/domain/test_domain_release_request.rb +29 -0
- data/test/requests/domain/test_domain_renew_request.rb +15 -0
- data/test/requests/domain/test_domain_unrenew_request.rb +32 -0
- data/test/requests/domain/test_domain_update_request.rb +163 -0
- data/test/requests/host/test_host_check_request.rb +25 -0
- data/test/requests/host/test_host_create_request.rb +33 -0
- data/test/requests/host/test_host_delete_request.rb +20 -0
- data/test/requests/host/test_host_info_request.rb +20 -0
- data/test/requests/host/test_host_update_request.rb +55 -0
- data/test/responses/contact/test_contact_check_response.rb +28 -0
- data/test/responses/contact/test_contact_create_response.rb +28 -0
- data/test/responses/contact/test_contact_delete_response.rb +18 -0
- data/test/responses/contact/test_contact_info_response.rb +79 -0
- data/test/responses/contact/test_contact_release_response.rb +18 -0
- data/test/responses/contact/test_contact_update_response.rb +18 -0
- data/test/responses/custom/test_custom_handshake_response.rb +27 -0
- data/test/responses/custom/test_custom_list_response.rb +44 -0
- data/test/responses/custom/test_custom_tag_list_response.rb +43 -0
- data/test/responses/domain/test_domain_check_response.rb +56 -0
- data/test/responses/domain/test_domain_create_response.rb +34 -0
- data/test/responses/domain/test_domain_delete_response.rb +18 -0
- data/test/responses/domain/test_domain_info_response.rb +76 -0
- data/test/responses/domain/test_domain_release_response.rb +18 -0
- data/test/responses/domain/test_domain_renew_response.rb +27 -0
- data/test/responses/domain/test_domain_unrenew_response.rb +32 -0
- data/test/responses/domain/test_domain_update_response.rb +18 -0
- data/test/responses/host/test_host_check_response.rb +28 -0
- data/test/responses/host/test_host_create_response.rb +28 -0
- data/test/responses/host/test_host_delete_response.rb +18 -0
- data/test/responses/host/test_host_info_response.rb +28 -0
- data/test/responses/host/test_host_update_response.rb +18 -0
- data/test/support/responses/contact/check.xml +23 -0
- data/test/support/responses/contact/create.xml +23 -0
- data/test/support/responses/contact/delete.xml +12 -0
- data/test/support/responses/contact/info.xml +46 -0
- data/test/support/responses/contact/release.xml +12 -0
- data/test/support/responses/contact/update.xml +12 -0
- data/test/support/responses/custom/handshake.xml +24 -0
- data/test/support/responses/custom/list.xml +28 -0
- data/test/support/responses/custom/list_empty.xml +21 -0
- data/test/support/responses/custom/tag_list.xml +28 -0
- data/test/support/responses/domain/check-direct-rights.xml +1 -0
- data/test/support/responses/domain/check.xml +25 -0
- data/test/support/responses/domain/create.xml +24 -0
- data/test/support/responses/domain/delete.xml +12 -0
- data/test/support/responses/domain/info.xml +45 -0
- data/test/support/responses/domain/release.xml +12 -0
- data/test/support/responses/domain/renew.xml +24 -0
- data/test/support/responses/domain/unrenew.xml +26 -0
- data/test/support/responses/domain/update.xml +12 -0
- data/test/support/responses/host/check.xml +23 -0
- data/test/support/responses/host/create.xml +18 -0
- data/test/support/responses/host/delete.xml +12 -0
- data/test/support/responses/host/info.xml +25 -0
- data/test/support/responses/host/update.xml +12 -0
- data/test/support/responses/notifications/abuse-feed.xml +31 -0
- data/test/support/responses/notifications/account-change.xml +39 -0
- data/test/support/responses/notifications/contact-deleted.xml +22 -0
- data/test/support/responses/notifications/data-quality.xml +53 -0
- data/test/support/responses/notifications/domain-cancelled.xml +22 -0
- data/test/support/responses/notifications/domains-released.xml +31 -0
- data/test/support/responses/notifications/domains-suspended.xml +26 -0
- data/test/support/responses/notifications/handshake-rejected.xml +31 -0
- data/test/support/responses/notifications/handshake-request.xml +65 -0
- data/test/support/responses/notifications/hosts-cancelled.xml +28 -0
- data/test/support/responses/notifications/referral-accepted.xml +23 -0
- data/test/support/responses/notifications/referral-rejected.xml +22 -0
- data/test/support/responses/notifications/registrant-transfer.xml +54 -0
- data/test/support/responses/notifications/registrar-change.xml +67 -0
- data/test/support/schemas/README +12 -0
- data/test/support/schemas/RELEASENOTES +54 -0
- data/test/support/schemas/contact-1.0.xsd +387 -0
- data/test/support/schemas/contact-nom-ext-1.0.xsd +144 -0
- data/test/support/schemas/domain-1.0.xsd +432 -0
- data/test/support/schemas/domain-nom-ext-1.2.xsd +215 -0
- data/test/support/schemas/epp-1.0.xsd +403 -0
- data/test/support/schemas/eppcom-1.0.xsd +93 -0
- data/test/support/schemas/host-1.0.xsd +240 -0
- data/test/support/schemas/nom-abuse-feed-1.0.xsd +46 -0
- data/test/support/schemas/nom-direct-rights-1.0.xsd +48 -0
- data/test/support/schemas/nom-root-std-1.0.7.xsd +47 -0
- data/test/support/schemas/nom-root-tag-1.0.xsd +31 -0
- data/test/support/schemas/nom-tag-1.0.xsd +71 -0
- data/test/support/schemas/secDNS-1.1.xsd +127 -0
- data/test/support/schemas/std-contact-id-1.0.xsd +35 -0
- data/test/support/schemas/std-fork-1.0.xsd +31 -0
- data/test/support/schemas/std-handshake-1.0.xsd +61 -0
- data/test/support/schemas/std-list-1.0.xsd +55 -0
- data/test/support/schemas/std-locks-1.0.xsd +53 -0
- data/test/support/schemas/std-notifications-1.2.xsd +197 -0
- data/test/support/schemas/std-release-1.0.xsd +39 -0
- data/test/support/schemas/std-unrenew-1.0.xsd +26 -0
- data/test/support/schemas/std-warning-1.1.xsd +145 -0
- data/test/test_nominet-epp.rb +3 -3
- metadata +324 -104
- data/History.rdoc +0 -78
- data/README.rdoc +0 -23
- data/VERSION +0 -1
- data/lib/nominet-epp/operations/check.rb +0 -39
- data/lib/nominet-epp/operations/create.rb +0 -138
- data/lib/nominet-epp/operations/delete.rb +0 -20
- data/lib/nominet-epp/operations/fork.rb +0 -53
- data/lib/nominet-epp/operations/hello.rb +0 -11
- data/lib/nominet-epp/operations/info.rb +0 -93
- data/lib/nominet-epp/operations/list.rb +0 -83
- data/lib/nominet-epp/operations/lock.rb +0 -56
- data/lib/nominet-epp/operations/merge.rb +0 -41
- data/lib/nominet-epp/operations/poll.rb +0 -64
- data/lib/nominet-epp/operations/renew.rb +0 -40
- data/lib/nominet-epp/operations/transfer.rb +0 -84
- data/lib/nominet-epp/operations/unlock.rb +0 -56
- data/lib/nominet-epp/operations/unrenew.rb +0 -36
- data/lib/nominet-epp/operations/update.rb +0 -176
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetContactInfoResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Contact::Info' do
|
5
|
+
setup do
|
6
|
+
@info_response = NominetEPP::Contact::InfoResponse.new(load_response('contact/info'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @info_response.success?
|
11
|
+
assert_equal 1000, @info_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @info_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have id' do
|
19
|
+
assert_equal 'EAXXMK1FW0YZTABD', @info_response.id
|
20
|
+
end
|
21
|
+
|
22
|
+
should 'have name' do
|
23
|
+
assert_equal 'EAXXMK1FW0YZTABD', @info_response.name
|
24
|
+
end
|
25
|
+
|
26
|
+
should 'have roid' do
|
27
|
+
assert_equal '50643904-UK', @info_response.roid
|
28
|
+
end
|
29
|
+
|
30
|
+
should 'have postal info' do
|
31
|
+
expected = { :name => "Mary Smith",
|
32
|
+
:org => "Simple Registrant-TESTING",
|
33
|
+
:addr => {
|
34
|
+
:street => "2 Test Street",
|
35
|
+
:city => "Test City",
|
36
|
+
:sp => "Testshire",
|
37
|
+
:pc => "TE57 1NG",
|
38
|
+
:cc => "GB" }}
|
39
|
+
assert_equal expected, @info_response.postal_info
|
40
|
+
end
|
41
|
+
|
42
|
+
should 'have voice' do
|
43
|
+
assert_equal '+44.1234567890', @info_response.voice
|
44
|
+
end
|
45
|
+
should 'have email' do
|
46
|
+
assert_equal 'mary.smith@ariel-testing.co.uk', @info_response.email
|
47
|
+
end
|
48
|
+
|
49
|
+
should 'have client_id' do
|
50
|
+
assert_equal 'TESTING', @info_response.client_id
|
51
|
+
end
|
52
|
+
|
53
|
+
should 'have creator_id' do
|
54
|
+
assert_equal 'psamathe@nominet.org.uk', @info_response.creator_id
|
55
|
+
end
|
56
|
+
|
57
|
+
should 'have created_date' do
|
58
|
+
# 2013-09-13T00:09:32
|
59
|
+
expected = Time.mktime(2013,9,13,0,9,32)
|
60
|
+
assert_equal expected, @info_response.created_date
|
61
|
+
end
|
62
|
+
|
63
|
+
should 'have trad-name' do
|
64
|
+
assert_equal 'Simple Registrant Trading Ltd', @info_response.trad_name
|
65
|
+
end
|
66
|
+
|
67
|
+
should 'have type' do
|
68
|
+
assert_equal 'LTD', @info_response.type
|
69
|
+
end
|
70
|
+
|
71
|
+
should 'have co-no' do
|
72
|
+
assert_equal '12345678', @info_response.co_no
|
73
|
+
end
|
74
|
+
|
75
|
+
should 'have opt-out' do
|
76
|
+
assert_equal false, @info_response.opt_out
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetContactReleaseResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Contact::Release' do
|
5
|
+
setup do
|
6
|
+
@release_response = NominetEPP::Contact::ReleaseResponse.new(load_response('contact/release'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @release_response.success?
|
11
|
+
assert_equal 1000, @release_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @release_response.message
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetContactUpdateResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Contact::Update' do
|
5
|
+
setup do
|
6
|
+
@update_response = NominetEPP::Contact::UpdateResponse.new(load_response('contact/update'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @update_response.success?
|
11
|
+
assert_equal 1000, @update_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @update_response.message
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetCustomHandshakeResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Custom::Handshake' do
|
5
|
+
setup do
|
6
|
+
@handshake_response = NominetEPP::Custom::HandshakeResponse.new(load_response('custom/handshake'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @handshake_response.success?
|
11
|
+
assert_equal 1000, @handshake_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @handshake_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have caseId' do
|
19
|
+
assert_equal '6', @handshake_response.case_id
|
20
|
+
end
|
21
|
+
|
22
|
+
should 'have domains' do
|
23
|
+
expected = %w(example1.co.uk example2.co.uk)
|
24
|
+
assert_equal expected, @handshake_response.domains
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetCustomListResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Custom::List' do
|
5
|
+
context 'empty' do
|
6
|
+
setup do
|
7
|
+
@list_response = NominetEPP::Custom::ListResponse.new(load_response('custom/list_empty'))
|
8
|
+
end
|
9
|
+
|
10
|
+
should 'be successful' do
|
11
|
+
assert @list_response.success?
|
12
|
+
assert_equal 1000, @list_response.code
|
13
|
+
end
|
14
|
+
|
15
|
+
should 'have message' do
|
16
|
+
assert_equal 'Command completed successfully', @list_response.message
|
17
|
+
end
|
18
|
+
|
19
|
+
should 'have no domains' do
|
20
|
+
assert_equal 0, @list_response.domains.count
|
21
|
+
end
|
22
|
+
end
|
23
|
+
context 'not empty' do
|
24
|
+
setup do
|
25
|
+
@list_response = NominetEPP::Custom::ListResponse.new(load_response('custom/list'))
|
26
|
+
end
|
27
|
+
|
28
|
+
should 'be successful' do
|
29
|
+
assert @list_response.success?
|
30
|
+
assert_equal 1000, @list_response.code
|
31
|
+
end
|
32
|
+
|
33
|
+
should 'have message' do
|
34
|
+
assert_equal 'Command completed successfully', @list_response.message
|
35
|
+
end
|
36
|
+
|
37
|
+
should 'have domains' do
|
38
|
+
expected = %w(epp-example1.co.uk epp-example2.co.uk epp-example3.co.uk
|
39
|
+
epp-example4.co.uk epp-example5.co.uk epp-example6.co.uk)
|
40
|
+
assert_equal expected, @list_response.domains
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetCustomTagListResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Custom::TagList' do
|
5
|
+
setup do
|
6
|
+
@tag_list_response = NominetEPP::Custom::TagListResponse.new(load_response('custom/tag_list'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @tag_list_response.success?
|
11
|
+
assert_equal 1000, @tag_list_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @tag_list_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have tags' do
|
19
|
+
expected = %w(EXAMPLE-TAG EXAMPLE2-TAG)
|
20
|
+
names = @tag_list_response.tags.keys.sort
|
21
|
+
|
22
|
+
assert_equal expected, names
|
23
|
+
end
|
24
|
+
|
25
|
+
should 'have EXAMPLE-TAG data' do
|
26
|
+
data = @tag_list_response.tags['EXAMPLE-TAG']
|
27
|
+
expected = {
|
28
|
+
'name' => 'Example company name',
|
29
|
+
'trad_name' => 'Example trading name',
|
30
|
+
'handshake' => true }
|
31
|
+
|
32
|
+
assert_equal expected, data
|
33
|
+
end
|
34
|
+
should 'have EXAMPLE2-TAG data' do
|
35
|
+
data = @tag_list_response.tags['EXAMPLE2-TAG']
|
36
|
+
expected = {
|
37
|
+
'name' => 'Example2 company name',
|
38
|
+
'handshake' => false }
|
39
|
+
|
40
|
+
assert_equal expected, data
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetDomainCheckResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Domain::Check' do
|
5
|
+
setup do
|
6
|
+
@check_response = NominetEPP::Domain::CheckResponse.new(load_response('domain/check'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @check_response.success?
|
11
|
+
assert_equal 1000, @check_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @check_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'list adriana-available.co.uk as available' do
|
19
|
+
assert @check_response.available?('adriana-available.co.uk')
|
20
|
+
assert !@check_response.unavailable?('adriana-available.co.uk')
|
21
|
+
end
|
22
|
+
|
23
|
+
should 'list adriana-unavailable.co.uk as unavailable' do
|
24
|
+
assert @check_response.unavailable?('adriana-unavailable.co.uk')
|
25
|
+
assert !@check_response.available?('adriana-unavailable.co.uk')
|
26
|
+
end
|
27
|
+
|
28
|
+
should 'have an abuse limit' do
|
29
|
+
assert_equal 49997, @check_response.abuse_limit
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context 'NominetEPP::Domain::Check with Domain Rights' do
|
34
|
+
setup do
|
35
|
+
@check_response = NominetEPP::Domain::CheckResponse.new(load_response('domain/check-direct-rights'))
|
36
|
+
end
|
37
|
+
|
38
|
+
should 'be successful' do
|
39
|
+
assert @check_response.success?
|
40
|
+
assert_equal 1000, @check_response.code
|
41
|
+
end
|
42
|
+
|
43
|
+
should 'have message' do
|
44
|
+
assert_equal 'Command completed successfully', @check_response.message
|
45
|
+
end
|
46
|
+
|
47
|
+
should 'list adriana-available.uk as available' do
|
48
|
+
assert @check_response.available?('adriana-available.uk')
|
49
|
+
assert !@check_response.unavailable?('adriana-available.uk')
|
50
|
+
end
|
51
|
+
|
52
|
+
should 'show adriana-available.co.uk as Right of Registration' do
|
53
|
+
assert_equal 'adriana-available.co.uk', @check_response.right_of_registration
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetDomainCreateResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Domain::Create' do
|
5
|
+
setup do
|
6
|
+
@create_response = NominetEPP::Domain::CreateResponse.new(load_response('domain/create'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @create_response.success?
|
11
|
+
assert_equal 1000, @create_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @create_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have name adriana2-testing.co.uk' do
|
19
|
+
assert_equal 'adriana2-testing.co.uk', @create_response.name
|
20
|
+
end
|
21
|
+
|
22
|
+
should 'have new creation date' do
|
23
|
+
# 2013-09-13T11:42:37 - local time, not UTC
|
24
|
+
expected = Time.mktime(2013,9,13,11,42,37)
|
25
|
+
assert_equal expected, @create_response.creation_date
|
26
|
+
end
|
27
|
+
|
28
|
+
should 'have new expiration date' do
|
29
|
+
# 2015-09-13T11:42:37 - local time, not UTC
|
30
|
+
expected = Time.mktime(2015,9,13,11,42,37)
|
31
|
+
assert_equal expected, @create_response.expiration_date
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetDomainDeleteResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Domain::Delete' do
|
5
|
+
setup do
|
6
|
+
@delete_response = NominetEPP::Domain::DeleteResponse.new(load_response('domain/delete'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @delete_response.success?
|
11
|
+
assert_equal 1000, @delete_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @delete_response.message
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetDomainInfoResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Domain::Info' do
|
5
|
+
setup do
|
6
|
+
@info_response = NominetEPP::Domain::InfoResponse.new(load_response('domain/info'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @info_response.success?
|
11
|
+
assert_equal 1000, @info_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @info_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have name' do
|
19
|
+
assert_equal 'ophelia-testing.co.uk', @info_response.name
|
20
|
+
end
|
21
|
+
|
22
|
+
should 'have roid' do
|
23
|
+
assert_equal '114112-UK', @info_response.roid
|
24
|
+
end
|
25
|
+
|
26
|
+
should 'have registrant' do
|
27
|
+
assert_equal 'EAXXMK1FW0YZTABD', @info_response.registrant
|
28
|
+
end
|
29
|
+
|
30
|
+
should 'have nameservers' do
|
31
|
+
expected = [ {'name' => 'ns1.ophelia-testing.co.uk' } ]
|
32
|
+
assert_equal expected, @info_response.nameservers
|
33
|
+
end
|
34
|
+
|
35
|
+
should 'have hosts' do
|
36
|
+
expected = %w(ns1.ophelia-testing.co.uk)
|
37
|
+
assert_equal expected, @info_response.hosts
|
38
|
+
end
|
39
|
+
|
40
|
+
should 'have client_id' do
|
41
|
+
assert_equal 'TESTING', @info_response.client_id
|
42
|
+
end
|
43
|
+
|
44
|
+
should 'have creator_id' do
|
45
|
+
assert_equal 'psamathe@nominet.org.uk', @info_response.creator_id
|
46
|
+
end
|
47
|
+
|
48
|
+
should 'have created_date' do
|
49
|
+
# 2012-09-13T00:09:32
|
50
|
+
expected = Time.mktime(2012,9,13,0,9,32)
|
51
|
+
assert_equal expected, @info_response.created_date
|
52
|
+
end
|
53
|
+
|
54
|
+
should 'have expiration_date' do
|
55
|
+
# 2014-09-13T00:09:32
|
56
|
+
expected = Time.mktime(2014,9,13,0,9,32)
|
57
|
+
assert_equal expected, @info_response.expiration_date
|
58
|
+
end
|
59
|
+
|
60
|
+
should 'have first-bill' do
|
61
|
+
assert_equal 'th', @info_response.first_bill
|
62
|
+
end
|
63
|
+
|
64
|
+
should 'have recur-bill' do
|
65
|
+
assert_equal 'th', @info_response.recur_bill
|
66
|
+
end
|
67
|
+
|
68
|
+
should 'have DS information' do
|
69
|
+
expected = { :key_tag => '12345',
|
70
|
+
:alg => '5',
|
71
|
+
:digest_type => '1',
|
72
|
+
:digest => '38EC35D5B3A34B44C39B38EC35D5B3A34B44C39B' }
|
73
|
+
assert_equal [expected], @info_response.ds
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetDomainReleaseResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Domain::Release' do
|
5
|
+
setup do
|
6
|
+
@release_response = NominetEPP::Domain::ReleaseResponse.new(load_response('domain/release'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @release_response.success?
|
11
|
+
assert_equal 1000, @release_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @release_response.message
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetDomainRenewResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Domain::Renew' do
|
5
|
+
setup do
|
6
|
+
@renew_response = NominetEPP::Domain::RenewResponse.new(load_response('domain/renew'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @renew_response.success?
|
11
|
+
assert_equal 1000, @renew_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @renew_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have name example.co.uk' do
|
19
|
+
assert_equal 'example.co.uk', @renew_response.name
|
20
|
+
end
|
21
|
+
|
22
|
+
should 'have new expiration date' do
|
23
|
+
expected = Time.gm(2010,12,12,13,04,46)
|
24
|
+
assert_equal expected, @renew_response.expiration_date
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetDomainUnrenewResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Domain::Unrenew' do
|
5
|
+
setup do
|
6
|
+
@unrenew_response = NominetEPP::Domain::UnrenewResponse.new(load_response('domain/unrenew'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @unrenew_response.success?
|
11
|
+
assert_equal 1000, @unrenew_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @unrenew_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have expiry date for example.co.uk' do
|
19
|
+
expect = Time.gm(2013,1,2,11,56,40)
|
20
|
+
exDate = @unrenew_response.expires?('example.co.uk')
|
21
|
+
|
22
|
+
assert_equal expect, exDate
|
23
|
+
end
|
24
|
+
|
25
|
+
should 'have expiry date for example2.co.uk' do
|
26
|
+
expect = Time.gm(2013,1,2,11,56,40)
|
27
|
+
exDate = @unrenew_response.expires?('example2.co.uk')
|
28
|
+
|
29
|
+
assert_equal expect, exDate
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetDomainUpdateResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Domain::Update' do
|
5
|
+
setup do
|
6
|
+
@update_response = NominetEPP::Domain::UpdateResponse.new(load_response('domain/update'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @update_response.success?
|
11
|
+
assert_equal 1000, @update_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @update_response.message
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetHostCheckResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Host::Check' do
|
5
|
+
setup do
|
6
|
+
@check_response = NominetEPP::Host::CheckResponse.new(load_response('host/check'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @check_response.success?
|
11
|
+
assert_equal 1000, @check_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @check_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'list ns3.beatrice-testing.co.uk as available' do
|
19
|
+
assert @check_response.available?('ns3.beatrice-testing.co.uk')
|
20
|
+
assert !@check_response.unavailable?('ns3.beatrice-testing.co.uk')
|
21
|
+
end
|
22
|
+
|
23
|
+
should 'list ns1.beatrice-testing.co.uk as unavailable' do
|
24
|
+
assert @check_response.unavailable?('ns1.beatrice-testing.co.uk')
|
25
|
+
assert !@check_response.available?('ns1.beatrice-testing.co.uk')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetHostCreateResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Host::Create' do
|
5
|
+
setup do
|
6
|
+
@create_response = NominetEPP::Host::CreateResponse.new(load_response('host/create'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @create_response.success?
|
11
|
+
assert_equal 1000, @create_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @create_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have name ns3.beatrice-testing.co.uk' do
|
19
|
+
assert_equal 'ns3.beatrice-testing.co.uk', @create_response.name
|
20
|
+
end
|
21
|
+
|
22
|
+
should 'have new creation date' do
|
23
|
+
# 2013-09-13T15:28:48 - local time, not UTC
|
24
|
+
expected = Time.mktime(2013,9,13,15,28,48)
|
25
|
+
assert_equal expected, @create_response.creation_date
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetHostDeleteResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Host::Delete' do
|
5
|
+
setup do
|
6
|
+
@delete_response = NominetEPP::Host::DeleteResponse.new(load_response('host/delete'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @delete_response.success?
|
11
|
+
assert_equal 1000, @delete_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @delete_response.message
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetHostInfoResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Host::Info' do
|
5
|
+
setup do
|
6
|
+
@info_response = NominetEPP::Host::InfoResponse.new(load_response('host/info'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @info_response.success?
|
11
|
+
assert_equal 1000, @info_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @info_response.message
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'have name' do
|
19
|
+
assert_equal 'ns1.beatrice-testing.co.uk', @info_response.name
|
20
|
+
end
|
21
|
+
|
22
|
+
should 'have addresses' do
|
23
|
+
expected = {'ipv4' => %w(1.2.3.4),
|
24
|
+
'ipv6' => %w(0001:0002:0003:0004:0005:0006:0007:0008)}
|
25
|
+
assert_equal expected, @info_response.addresses
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestNominetHostUpdateResponse < Test::Unit::TestCase
|
4
|
+
context 'NominetEPP::Host::Update' do
|
5
|
+
setup do
|
6
|
+
@update_response = NominetEPP::Host::UpdateResponse.new(load_response('host/update'))
|
7
|
+
end
|
8
|
+
|
9
|
+
should 'be successful' do
|
10
|
+
assert @update_response.success?
|
11
|
+
assert_equal 1000, @update_response.code
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'have message' do
|
15
|
+
assert_equal 'Command completed successfully', @update_response.message
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nominet.org.uk/epp/xml/epp-1.0 epp-1.0.xsd">
|
3
|
+
<response>
|
4
|
+
<result code="1000">
|
5
|
+
<msg>Command completed successfully</msg>
|
6
|
+
</result>
|
7
|
+
<resData>
|
8
|
+
<contact:chkData xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd">
|
9
|
+
<contact:cd>
|
10
|
+
<contact:id avail="0">EAXXMK1FW0YZTABD</contact:id>
|
11
|
+
<contact:reason>V284 Account exists already.</contact:reason>
|
12
|
+
</contact:cd>
|
13
|
+
<contact:cd>
|
14
|
+
<contact:id avail="1">ioefwurfoveyrf9e</contact:id>
|
15
|
+
</contact:cd>
|
16
|
+
</contact:chkData>
|
17
|
+
</resData>
|
18
|
+
<trID>
|
19
|
+
<clTRID>TESTING-000010</clTRID>
|
20
|
+
<svTRID>231987</svTRID>
|
21
|
+
</trID>
|
22
|
+
</response>
|
23
|
+
</epp>
|