dnsimple 2.0.0.alpha4 → 2.0.0.alpha5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.markdown +22 -2
- data/UPGRADING.markdown +102 -0
- data/lib/dnsimple/client.rb +37 -16
- data/lib/dnsimple/client/certificates.rb +9 -7
- data/lib/dnsimple/client/contacts.rb +7 -5
- data/lib/dnsimple/client/domains.rb +6 -4
- data/lib/dnsimple/client/domains_forwards.rb +6 -6
- data/lib/dnsimple/client/domains_records.rb +7 -7
- data/lib/dnsimple/client/domains_sharing.rb +4 -4
- data/lib/dnsimple/client/domains_zones.rb +1 -1
- data/lib/dnsimple/client/name_servers.rb +5 -3
- data/lib/dnsimple/client/registrar.rb +20 -7
- data/lib/dnsimple/client/services.rb +5 -3
- data/lib/dnsimple/client/services_domains.rb +4 -4
- data/lib/dnsimple/client/templates.rb +8 -6
- data/lib/dnsimple/client/templates_records.rb +7 -7
- data/lib/dnsimple/error.rb +1 -1
- data/lib/dnsimple/version.rb +1 -1
- data/spec/dnsimple/client/certificates_spec.rb +20 -20
- data/spec/dnsimple/client/contacts_spec.rb +24 -24
- data/spec/dnsimple/client/domains_autorenewals_spec.rb +4 -4
- data/spec/dnsimple/client/domains_forwards_spec.rb +17 -17
- data/spec/dnsimple/client/domains_privacy_spec.rb +4 -4
- data/spec/dnsimple/client/domains_records_spec.rb +20 -20
- data/spec/dnsimple/client/domains_sharing_spec.rb +12 -12
- data/spec/dnsimple/client/domains_spec.rb +14 -14
- data/spec/dnsimple/client/domains_zones_spec.rb +2 -2
- data/spec/dnsimple/client/name_servers_spec.rb +13 -13
- data/spec/dnsimple/client/registrar_spec.rb +48 -6
- data/spec/dnsimple/client/services_spec.rb +11 -11
- data/spec/dnsimple/client/templates_records_spec.rb +17 -17
- data/spec/dnsimple/client/templates_spec.rb +17 -17
- data/spec/dnsimple/client_spec.rb +23 -19
- data/spec/files/certificates/{show → get}/success.http +0 -0
- data/spec/files/certificates/{index → list}/success.http +0 -0
- data/spec/files/contacts/{show → get}/success.http +1 -1
- data/spec/files/contacts/{index → list}/success.http +1 -1
- data/spec/files/domains/{show → get}/success.http +0 -0
- data/spec/files/domains/{index → list}/success.http +0 -0
- data/spec/files/domains_records/{show → get}/success.http +0 -0
- data/spec/files/domains_records/{index → list}/success.http +0 -0
- data/spec/files/services/{show → get}/success.http +0 -0
- data/spec/files/services/{index → list}/success.http +0 -0
- data/spec/files/subscriptions/{show → get}/success.http +0 -0
- data/spec/files/templates/{show → get}/success.http +0 -0
- data/spec/files/templates/{index → list}/success.http +0 -0
- data/spec/files/templates_records/{show → get}/success.http +0 -0
- data/spec/files/templates_records/{index → list}/success.http +0 -0
- metadata +33 -32
@@ -26,13 +26,13 @@ describe Dnsimple::Client, ".domains / autorenewals" do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
context "when the domain does not exist" do
|
29
|
-
it "raises
|
29
|
+
it "raises NotFoundError" do
|
30
30
|
stub_request(:post, %r[/v1]).
|
31
31
|
to_return(read_fixture("domains_autorenewal/notfound-domain.http"))
|
32
32
|
|
33
33
|
expect {
|
34
34
|
subject.enable_auto_renewal("example.com")
|
35
|
-
}.to raise_error(Dnsimple::
|
35
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -58,13 +58,13 @@ describe Dnsimple::Client, ".domains / autorenewals" do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
context "when the domain does not exist" do
|
61
|
-
it "raises
|
61
|
+
it "raises NotFoundError" do
|
62
62
|
stub_request(:delete, %r[/v1]).
|
63
63
|
to_return(read_fixture("domains_autorenewal/notfound-domain.http"))
|
64
64
|
|
65
65
|
expect {
|
66
66
|
subject.disable_auto_renewal("example.com")
|
67
|
-
}.to raise_error(Dnsimple::
|
67
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -5,21 +5,21 @@ describe Dnsimple::Client, ".domains / forwards" do
|
|
5
5
|
subject { described_class.new(api_endpoint: "https://api.zone", username: "user", api_token: "token").domains }
|
6
6
|
|
7
7
|
|
8
|
-
describe "#
|
8
|
+
describe "#email_forwards" do
|
9
9
|
before do
|
10
|
-
stub_request(:get, %r[/v1/domains/.+/email_forwards]).
|
10
|
+
stub_request(:get, %r[/v1/domains/.+/email_forwards$]).
|
11
11
|
to_return(read_fixture("domains_forwards/list/success.http"))
|
12
12
|
end
|
13
13
|
|
14
14
|
it "builds the correct request" do
|
15
|
-
subject.
|
15
|
+
subject.email_forwards("example.com")
|
16
16
|
|
17
17
|
expect(WebMock).to have_requested(:get, "https://api.zone/v1/domains/example.com/email_forwards").
|
18
18
|
with(headers: { 'Accept' => 'application/json' })
|
19
19
|
end
|
20
20
|
|
21
21
|
it "returns the records" do
|
22
|
-
results = subject.
|
22
|
+
results = subject.email_forwards("example.com")
|
23
23
|
|
24
24
|
expect(results).to be_a(Array)
|
25
25
|
expect(results.size).to eq(2)
|
@@ -31,13 +31,13 @@ describe Dnsimple::Client, ".domains / forwards" do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
context "when the domain does not exist" do
|
34
|
-
it "raises
|
34
|
+
it "raises NotFoundError" do
|
35
35
|
stub_request(:get, %r[/v1]).
|
36
36
|
to_return(read_fixture("domains_forwards/notfound-domain.http"))
|
37
37
|
|
38
38
|
expect {
|
39
|
-
subject.
|
40
|
-
}.to raise_error(Dnsimple::
|
39
|
+
subject.email_forwards("example.com")
|
40
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -64,32 +64,32 @@ describe Dnsimple::Client, ".domains / forwards" do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
context "when the domain does not exist" do
|
67
|
-
it "raises
|
67
|
+
it "raises NotFoundError" do
|
68
68
|
stub_request(:post, %r[/v1]).
|
69
69
|
to_return(read_fixture("domains_forwards/notfound-domain.http"))
|
70
70
|
|
71
71
|
expect {
|
72
72
|
subject.create_email_forward("example.com", { from: "", to: "" })
|
73
|
-
}.to raise_error(Dnsimple::
|
73
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
describe "#
|
78
|
+
describe "#email_forward" do
|
79
79
|
before do
|
80
80
|
stub_request(:get, %r[/v1/domains/.+/email_forwards/.+$]).
|
81
81
|
to_return(read_fixture("domains_forwards/get/success.http"))
|
82
82
|
end
|
83
83
|
|
84
84
|
it "builds the correct request" do
|
85
|
-
subject.
|
85
|
+
subject.email_forward("example.com", 2)
|
86
86
|
|
87
87
|
expect(WebMock).to have_requested(:get, "https://api.zone/v1/domains/example.com/email_forwards/2").
|
88
88
|
with(headers: { 'Accept' => 'application/json' })
|
89
89
|
end
|
90
90
|
|
91
91
|
it "returns the record" do
|
92
|
-
result = subject.
|
92
|
+
result = subject.email_forward("example.com", 2)
|
93
93
|
|
94
94
|
expect(result).to be_a(Dnsimple::Struct::EmailForward)
|
95
95
|
expect(result.id).to eq(1)
|
@@ -101,13 +101,13 @@ describe Dnsimple::Client, ".domains / forwards" do
|
|
101
101
|
end
|
102
102
|
|
103
103
|
context "when forward does not exist" do
|
104
|
-
it "raises
|
104
|
+
it "raises NotFoundError" do
|
105
105
|
stub_request(:get, %r[/v1]).
|
106
106
|
to_return(read_fixture("domains_forwards/notfound.http"))
|
107
107
|
|
108
108
|
expect {
|
109
|
-
subject.
|
110
|
-
}.to raise_error(Dnsimple::
|
109
|
+
subject.email_forward("example.com", 2)
|
110
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
111
111
|
end
|
112
112
|
end
|
113
113
|
end
|
@@ -132,13 +132,13 @@ describe Dnsimple::Client, ".domains / forwards" do
|
|
132
132
|
end
|
133
133
|
|
134
134
|
context "when the forward does not exist" do
|
135
|
-
it "raises
|
135
|
+
it "raises NotFoundError" do
|
136
136
|
stub_request(:delete, %r[/v1]).
|
137
137
|
to_return(read_fixture("domains_forwards/notfound.http"))
|
138
138
|
|
139
139
|
expect {
|
140
140
|
subject.delete_email_forward("example.com", 2)
|
141
|
-
}.to raise_error(Dnsimple::
|
141
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
142
142
|
end
|
143
143
|
end
|
144
144
|
end
|
@@ -26,13 +26,13 @@ describe Dnsimple::Client, ".domains / privacy" do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
context "when the domain does not exist" do
|
29
|
-
it "raises
|
29
|
+
it "raises NotFoundError" do
|
30
30
|
stub_request(:post, %r[/v1]).
|
31
31
|
to_return(read_fixture("domains_privacy/notfound-domain.http"))
|
32
32
|
|
33
33
|
expect {
|
34
34
|
subject.enable_whois_privacy("example.com")
|
35
|
-
}.to raise_error(Dnsimple::
|
35
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -58,13 +58,13 @@ describe Dnsimple::Client, ".domains / privacy" do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
context "when the domain does not exist" do
|
61
|
-
it "raises
|
61
|
+
it "raises NotFoundError" do
|
62
62
|
stub_request(:delete, %r[/v1]).
|
63
63
|
to_return(read_fixture("domains_privacy/notfound-domain.http"))
|
64
64
|
|
65
65
|
expect {
|
66
66
|
subject.disable_whois_privacy("example.com")
|
67
|
-
}.to raise_error(Dnsimple::
|
67
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -5,21 +5,21 @@ describe Dnsimple::Client, ".domains / records" do
|
|
5
5
|
subject { described_class.new(api_endpoint: "https://api.zone", username: "user", api_token: "token").domains }
|
6
6
|
|
7
7
|
|
8
|
-
describe "#
|
8
|
+
describe "#records" do
|
9
9
|
before do
|
10
10
|
stub_request(:get, %r[/v1/domains/.+/records$]).
|
11
|
-
to_return(read_fixture("domains_records/
|
11
|
+
to_return(read_fixture("domains_records/list/success.http"))
|
12
12
|
end
|
13
13
|
|
14
14
|
it "builds the correct request" do
|
15
|
-
subject.
|
15
|
+
subject.records("example.com")
|
16
16
|
|
17
17
|
expect(WebMock).to have_requested(:get, "https://api.zone/v1/domains/example.com/records").
|
18
18
|
with(headers: { 'Accept' => 'application/json' })
|
19
19
|
end
|
20
20
|
|
21
21
|
it "returns the records" do
|
22
|
-
results = subject.
|
22
|
+
results = subject.records("example.com")
|
23
23
|
|
24
24
|
expect(results).to be_a(Array)
|
25
25
|
expect(results.size).to eq(7)
|
@@ -31,13 +31,13 @@ describe Dnsimple::Client, ".domains / records" do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
context "when something does not exist" do
|
34
|
-
it "raises
|
34
|
+
it "raises NotFoundError" do
|
35
35
|
stub_request(:get, %r[/v1]).
|
36
36
|
to_return(read_fixture("domains_records/notfound.http"))
|
37
37
|
|
38
38
|
expect {
|
39
|
-
subject.
|
40
|
-
}.to raise_error(Dnsimple::
|
39
|
+
subject.records("example.com")
|
40
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -64,32 +64,32 @@ describe Dnsimple::Client, ".domains / records" do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
context "when something does not exist" do
|
67
|
-
it "raises
|
67
|
+
it "raises NotFoundError" do
|
68
68
|
stub_request(:post, %r[/v1]).
|
69
69
|
to_return(read_fixture("domains/notfound.http"))
|
70
70
|
|
71
71
|
expect {
|
72
72
|
subject.create_record("example.com", { name: "", record_type: "", content: "" })
|
73
|
-
}.to raise_error(Dnsimple::
|
73
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
describe "#
|
78
|
+
describe "#record" do
|
79
79
|
before do
|
80
80
|
stub_request(:get, %r[/v1/domains/.+/records/.+$]).
|
81
|
-
to_return(read_fixture("domains_records/
|
81
|
+
to_return(read_fixture("domains_records/get/success.http"))
|
82
82
|
end
|
83
83
|
|
84
84
|
it "builds the correct request" do
|
85
|
-
subject.
|
85
|
+
subject.record("example.com", 2)
|
86
86
|
|
87
87
|
expect(WebMock).to have_requested(:get, "https://api.zone/v1/domains/example.com/records/2").
|
88
88
|
with(headers: { 'Accept' => 'application/json' })
|
89
89
|
end
|
90
90
|
|
91
91
|
it "returns the record" do
|
92
|
-
result = subject.
|
92
|
+
result = subject.record("example.com", 2)
|
93
93
|
|
94
94
|
expect(result).to be_a(Dnsimple::Struct::Record)
|
95
95
|
expect(result.id).to eq(1495)
|
@@ -104,13 +104,13 @@ describe Dnsimple::Client, ".domains / records" do
|
|
104
104
|
end
|
105
105
|
|
106
106
|
context "when something does not exist" do
|
107
|
-
it "raises
|
107
|
+
it "raises NotFoundError" do
|
108
108
|
stub_request(:get, %r[/v1]).
|
109
109
|
to_return(read_fixture("domains_records/notfound.http"))
|
110
110
|
|
111
111
|
expect {
|
112
|
-
subject.
|
113
|
-
}.to raise_error(Dnsimple::
|
112
|
+
subject.record("example.com", 2)
|
113
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
114
114
|
end
|
115
115
|
end
|
116
116
|
end
|
@@ -137,13 +137,13 @@ describe Dnsimple::Client, ".domains / records" do
|
|
137
137
|
end
|
138
138
|
|
139
139
|
context "when something does not exist" do
|
140
|
-
it "raises
|
140
|
+
it "raises NotFoundError" do
|
141
141
|
stub_request(:put, %r[/v1]).
|
142
142
|
to_return(read_fixture("domains_records/notfound.http"))
|
143
143
|
|
144
144
|
expect {
|
145
145
|
subject.update_record("example.com", 2, {})
|
146
|
-
}.to raise_error(Dnsimple::
|
146
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
147
147
|
end
|
148
148
|
end
|
149
149
|
end
|
@@ -177,13 +177,13 @@ describe Dnsimple::Client, ".domains / records" do
|
|
177
177
|
end
|
178
178
|
|
179
179
|
context "when something does not exist" do
|
180
|
-
it "raises
|
180
|
+
it "raises NotFoundError" do
|
181
181
|
stub_request(:delete, %r[/v1]).
|
182
182
|
to_return(read_fixture("domains_records/notfound.http"))
|
183
183
|
|
184
184
|
expect {
|
185
185
|
subject.delete_record("example.com", 2)
|
186
|
-
}.to raise_error(Dnsimple::
|
186
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
187
187
|
end
|
188
188
|
end
|
189
189
|
end
|
@@ -5,21 +5,21 @@ describe Dnsimple::Client, ".domains / sharing" do
|
|
5
5
|
subject { described_class.new(api_endpoint: "https://api.zone", username: "user", api_token: "token").domains }
|
6
6
|
|
7
7
|
|
8
|
-
describe "#
|
8
|
+
describe "#memberships" do
|
9
9
|
before do
|
10
|
-
stub_request(:get, %r[/v1/domains/.+/memberships]).
|
10
|
+
stub_request(:get, %r[/v1/domains/.+/memberships$]).
|
11
11
|
to_return(read_fixture("domains_sharing/list/success.http"))
|
12
12
|
end
|
13
13
|
|
14
14
|
it "builds the correct request" do
|
15
|
-
subject.
|
15
|
+
subject.memberships("example.com")
|
16
16
|
|
17
17
|
expect(WebMock).to have_requested(:get, "https://api.zone/v1/domains/example.com/memberships").
|
18
18
|
with(headers: { 'Accept' => 'application/json' })
|
19
19
|
end
|
20
20
|
|
21
21
|
it "returns the records" do
|
22
|
-
results = subject.
|
22
|
+
results = subject.memberships("example.com")
|
23
23
|
|
24
24
|
expect(results).to be_a(Array)
|
25
25
|
expect(results.size).to eq(2)
|
@@ -31,20 +31,20 @@ describe Dnsimple::Client, ".domains / sharing" do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
context "when the domain does not exist" do
|
34
|
-
it "raises
|
34
|
+
it "raises NotFoundError" do
|
35
35
|
stub_request(:get, %r[/v1]).
|
36
36
|
to_return(read_fixture("domains_sharing/notfound-domain.http"))
|
37
37
|
|
38
38
|
expect {
|
39
|
-
subject.
|
40
|
-
}.to raise_error(Dnsimple::
|
39
|
+
subject.memberships("example.com")
|
40
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
45
|
describe "#create_membership" do
|
46
46
|
before do
|
47
|
-
stub_request(:post, %r[/v1/domains/.+/memberships]).
|
47
|
+
stub_request(:post, %r[/v1/domains/.+/memberships$]).
|
48
48
|
to_return(read_fixture("domains_sharing/create/success.http"))
|
49
49
|
end
|
50
50
|
|
@@ -64,13 +64,13 @@ describe Dnsimple::Client, ".domains / sharing" do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
context "when the domain does not exist" do
|
67
|
-
it "raises
|
67
|
+
it "raises NotFoundError" do
|
68
68
|
stub_request(:post, %r[/v1]).
|
69
69
|
to_return(read_fixture("domains_forwards/notfound-domain.http"))
|
70
70
|
|
71
71
|
expect {
|
72
72
|
subject.create_membership("example.com", "someone@example.com")
|
73
|
-
}.to raise_error(Dnsimple::
|
73
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
@@ -95,13 +95,13 @@ describe Dnsimple::Client, ".domains / sharing" do
|
|
95
95
|
end
|
96
96
|
|
97
97
|
context "when the membership does not exist" do
|
98
|
-
it "raises
|
98
|
+
it "raises NotFoundError" do
|
99
99
|
stub_request(:delete, %r[/v1]).
|
100
100
|
to_return(read_fixture("domains_sharing/notfound.http"))
|
101
101
|
|
102
102
|
expect {
|
103
103
|
subject.delete_membership("example.com", 2)
|
104
|
-
}.to raise_error(Dnsimple::
|
104
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
105
105
|
end
|
106
106
|
end
|
107
107
|
end
|
@@ -5,21 +5,21 @@ describe Dnsimple::Client, ".domains" do
|
|
5
5
|
subject { described_class.new(api_endpoint: "https://api.zone", username: "user", api_token: "token").domains }
|
6
6
|
|
7
7
|
|
8
|
-
describe "#
|
8
|
+
describe "#domains" do
|
9
9
|
before do
|
10
10
|
stub_request(:get, %r[/v1/domains$]).
|
11
|
-
to_return(read_fixture("domains/
|
11
|
+
to_return(read_fixture("domains/list/success.http"))
|
12
12
|
end
|
13
13
|
|
14
14
|
it "builds the correct request" do
|
15
|
-
subject.
|
15
|
+
subject.domains
|
16
16
|
|
17
17
|
expect(WebMock).to have_requested(:get, "https://api.zone/v1/domains").
|
18
18
|
with(headers: { 'Accept' => 'application/json' })
|
19
19
|
end
|
20
20
|
|
21
21
|
it "returns the domains" do
|
22
|
-
results = subject.
|
22
|
+
results = subject.domains
|
23
23
|
|
24
24
|
expect(results).to be_a(Array)
|
25
25
|
expect(results.size).to eq(2)
|
@@ -33,7 +33,7 @@ describe Dnsimple::Client, ".domains" do
|
|
33
33
|
|
34
34
|
describe "#create" do
|
35
35
|
before do
|
36
|
-
stub_request(:post, %r[/v1/domains]).
|
36
|
+
stub_request(:post, %r[/v1/domains$]).
|
37
37
|
to_return(read_fixture("domains/create/created.http"))
|
38
38
|
end
|
39
39
|
|
@@ -55,21 +55,21 @@ describe Dnsimple::Client, ".domains" do
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
describe "#
|
58
|
+
describe "#domain" do
|
59
59
|
before do
|
60
60
|
stub_request(:get, %r[/v1/domains/.+$]).
|
61
|
-
to_return(read_fixture("domains/
|
61
|
+
to_return(read_fixture("domains/get/success.http"))
|
62
62
|
end
|
63
63
|
|
64
64
|
it "builds the correct request" do
|
65
|
-
subject.
|
65
|
+
subject.domain("example.com")
|
66
66
|
|
67
67
|
expect(WebMock).to have_requested(:get, "https://api.zone/v1/domains/example.com").
|
68
68
|
with(headers: { 'Accept' => 'application/json' })
|
69
69
|
end
|
70
70
|
|
71
71
|
it "returns the domain" do
|
72
|
-
result = subject.
|
72
|
+
result = subject.domain("example.com")
|
73
73
|
|
74
74
|
expect(result).to be_a(Dnsimple::Struct::Domain)
|
75
75
|
expect(result.id).to eq(1)
|
@@ -85,13 +85,13 @@ describe Dnsimple::Client, ".domains" do
|
|
85
85
|
end
|
86
86
|
|
87
87
|
context "when something does not exist" do
|
88
|
-
it "raises
|
88
|
+
it "raises NotFoundError" do
|
89
89
|
stub_request(:get, %r[/v1]).
|
90
90
|
to_return(read_fixture("domains/notfound.http"))
|
91
91
|
|
92
92
|
expect {
|
93
|
-
subject.
|
94
|
-
}.to raise_error(Dnsimple::
|
93
|
+
subject.domain("example.com")
|
94
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
95
95
|
end
|
96
96
|
end
|
97
97
|
end
|
@@ -125,13 +125,13 @@ describe Dnsimple::Client, ".domains" do
|
|
125
125
|
end
|
126
126
|
|
127
127
|
context "when something does not exist" do
|
128
|
-
it "raises
|
128
|
+
it "raises NotFoundError" do
|
129
129
|
stub_request(:delete, %r[/v1]).
|
130
130
|
to_return(read_fixture("domains/notfound.http"))
|
131
131
|
|
132
132
|
expect {
|
133
133
|
subject.delete("example.com")
|
134
|
-
}.to raise_error(Dnsimple::
|
134
|
+
}.to raise_error(Dnsimple::NotFoundError)
|
135
135
|
end
|
136
136
|
end
|
137
137
|
end
|