dnsimple 4.3.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -0
  3. data/.rubocop_dnsimple.yml +28 -8
  4. data/.travis.yml +12 -7
  5. data/CHANGELOG.md +7 -0
  6. data/LICENSE.txt +1 -1
  7. data/README.md +1 -1
  8. data/lib/dnsimple/client.rb +1 -1
  9. data/lib/dnsimple/client/certificates.rb +185 -28
  10. data/lib/dnsimple/client/registrar.rb +5 -5
  11. data/lib/dnsimple/struct.rb +2 -0
  12. data/lib/dnsimple/struct/certificate.rb +9 -0
  13. data/lib/dnsimple/struct/certificate_purchase.rb +25 -0
  14. data/lib/dnsimple/struct/certificate_renewal.rb +28 -0
  15. data/lib/dnsimple/struct/domain_registration.rb +0 -3
  16. data/lib/dnsimple/struct/domain_renewal.rb +0 -3
  17. data/lib/dnsimple/struct/domain_transfer.rb +0 -3
  18. data/lib/dnsimple/struct/extended_attribute.rb +1 -1
  19. data/lib/dnsimple/struct/service.rb +1 -1
  20. data/lib/dnsimple/struct/whoami.rb +2 -2
  21. data/lib/dnsimple/version.rb +1 -1
  22. data/spec/dnsimple/client/certificates_spec.rb +225 -1
  23. data/spec/dnsimple/client/collaborators_spec.rb +1 -1
  24. data/spec/dnsimple/client/contacts_spec.rb +1 -1
  25. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +1 -1
  26. data/spec/dnsimple/client/domains_dnssec_spec.rb +2 -2
  27. data/spec/dnsimple/client/domains_email_forwards_spec.rb +1 -1
  28. data/spec/dnsimple/client/domains_pushes_spec.rb +1 -1
  29. data/spec/dnsimple/client/domains_spec.rb +3 -3
  30. data/spec/dnsimple/client/registrar_spec.rb +3 -3
  31. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +3 -3
  32. data/spec/dnsimple/client/services_spec.rb +1 -1
  33. data/spec/dnsimple/client/tlds_spec.rb +7 -7
  34. data/spec/dnsimple/client/zones_records_spec.rb +2 -2
  35. data/spec/dnsimple/client/zones_spec.rb +2 -2
  36. data/spec/fixtures.http/{transferDomainOut → authorizeDomainTransferOut}/success.http +0 -0
  37. data/spec/fixtures.http/getCertificate/success.http +1 -1
  38. data/spec/fixtures.http/issueLetsencryptCertificate/success.http +21 -0
  39. data/spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http +21 -0
  40. data/spec/fixtures.http/listCertificates/success.http +1 -1
  41. data/spec/fixtures.http/purchaseLetsencryptCertificate/success.http +21 -0
  42. data/spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +21 -0
  43. data/spec/fixtures.http/whoami/success-account.http +1 -1
  44. data/spec/fixtures.http/whoami/success-user.http +1 -1
  45. data/spec/fixtures.http/whoami/success.http +1 -1
  46. metadata +15 -5
@@ -18,6 +18,8 @@ require_relative 'struct/collaborator'
18
18
  require_relative 'struct/contact'
19
19
  require_relative 'struct/certificate'
20
20
  require_relative 'struct/certificate_bundle'
21
+ require_relative 'struct/certificate_purchase'
22
+ require_relative 'struct/certificate_renewal'
21
23
  require_relative 'struct/delegation_signer_record'
22
24
  require_relative 'struct/dnssec'
23
25
  require_relative 'struct/domain'
@@ -8,9 +8,15 @@ module Dnsimple
8
8
  # @return [Integer] The associated domain ID.
9
9
  attr_accessor :domain_id
10
10
 
11
+ # @return [Integer] The associated contact ID.
12
+ attr_accessor :contact_id
13
+
11
14
  # @return [String] The certificate common name.
12
15
  attr_accessor :common_name
13
16
 
17
+ # @return [Array<String>] The certificate alternate names.
18
+ attr_accessor :alternate_names
19
+
14
20
  # @return [Integer] The years the certificate will last.
15
21
  attr_accessor :years
16
22
 
@@ -23,6 +29,9 @@ module Dnsimple
23
29
  # @return [String] The Certificate Authority (CA) that issued the certificate.
24
30
  attr_accessor :authority_identifier
25
31
 
32
+ # @return [Boolean] True if the certificate is set to auto-renew on expiration.
33
+ attr_accessor :auto_renew
34
+
26
35
  # @return [String] When the certificate was created in DNSimple.
27
36
  attr_accessor :created_at
28
37
 
@@ -0,0 +1,25 @@
1
+ module Dnsimple
2
+ module Struct
3
+
4
+ class CertificatePurchase < Base
5
+ # @return [Integer] The certificate purchase ID in DNSimple.
6
+ attr_accessor :id
7
+
8
+ # @return [Integer] The certificate ID.
9
+ attr_accessor :certificate_id
10
+
11
+ # @return [String] The certificate renewal state.
12
+ attr_accessor :state
13
+
14
+ # @return [Boolean] True if the certificate is requested to auto-renew
15
+ attr_accessor :auto_renew
16
+
17
+ # @return [String] When the certificate renewal was created in DNSimple.
18
+ attr_accessor :created_at
19
+
20
+ # @return [String] When the certificate renewal was last updated in DNSimple.
21
+ attr_accessor :updated_at
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,28 @@
1
+ module Dnsimple
2
+ module Struct
3
+
4
+ class CertificateRenewal < Base
5
+ # @return [Integer] The certificate renewal ID in DNSimple.
6
+ attr_accessor :id
7
+
8
+ # @return [Integer] The old certificate ID.
9
+ attr_accessor :old_certificate_id
10
+
11
+ # @return [Integer] The new certificate ID.
12
+ attr_accessor :new_certificate_id
13
+
14
+ # @return [String] The certificate renewal state.
15
+ attr_accessor :state
16
+
17
+ # @return [Boolean] True if the certificate is requested to auto-renew
18
+ attr_accessor :auto_renew
19
+
20
+ # @return [String] When the certificate renewal was created in DNSimple.
21
+ attr_accessor :created_at
22
+
23
+ # @return [String] When the certificate renewal was last updated in DNSimple.
24
+ attr_accessor :updated_at
25
+ end
26
+
27
+ end
28
+ end
@@ -23,9 +23,6 @@ module Dnsimple
23
23
  # @return [Bool] True if the domain WHOIS privacy was requested.
24
24
  attr_accessor :whois_privacy
25
25
 
26
- # @return [String] The premium price requested for the registration.
27
- attr_accessor :premium_price
28
-
29
26
  # @return [String] When the domain renewal was created in DNSimple.
30
27
  attr_accessor :created_at
31
28
 
@@ -14,9 +14,6 @@ module Dnsimple
14
14
  # @return [String] The state of the renewal.
15
15
  attr_accessor :state
16
16
 
17
- # @return [String] The premium price requested for the renewal.
18
- attr_accessor :premium_price
19
-
20
17
  # @return [String] When the domain renewal was created in DNSimple.
21
18
  attr_accessor :created_at
22
19
 
@@ -20,9 +20,6 @@ module Dnsimple
20
20
  # @return [Bool] True if the domain WHOIS privacy was requested.
21
21
  attr_accessor :whois_privacy
22
22
 
23
- # @return [String] The premium price requested for the registration.
24
- attr_accessor :premium_price
25
-
26
23
  # @return [String] When the domain renewal was created in DNSimple.
27
24
  attr_accessor :created_at
28
25
 
@@ -24,7 +24,7 @@ module Dnsimple
24
24
  attr_accessor :required
25
25
 
26
26
  # @return [Array<Options>] The array of options with possible values for the extended attribute
27
- attr_accessor :options
27
+ attr_reader :options
28
28
 
29
29
  def initialize(*)
30
30
  super
@@ -45,7 +45,7 @@ module Dnsimple
45
45
  attr_accessor :default_subdomain
46
46
 
47
47
  # @return [Array<Settings>] The array of settings to setup this service, if setup is required.
48
- attr_accessor :settings
48
+ attr_reader :settings
49
49
 
50
50
  def initialize(*)
51
51
  super
@@ -3,10 +3,10 @@ module Dnsimple
3
3
 
4
4
  class Whoami < Base
5
5
  # @return [Account] The account, if present.
6
- attr_accessor :account
6
+ attr_reader :account
7
7
 
8
8
  # @return [String] The user, if present.
9
- attr_accessor :user
9
+ attr_reader :user
10
10
 
11
11
 
12
12
  # Converts account to a Struct::Account and sets it.
@@ -1,3 +1,3 @@
1
1
  module Dnsimple
2
- VERSION = "4.3.0".freeze
2
+ VERSION = "4.4.0".freeze
3
3
  end
@@ -48,7 +48,7 @@ describe Dnsimple::Client, ".certificates" do
48
48
  it "exposes the pagination information" do
49
49
  response = subject.certificates(account_id, domain_id)
50
50
 
51
- expect(response.respond_to?(:page)).to be_truthy
51
+ expect(response.respond_to?(:page)).to be(true)
52
52
  expect(response.page).to eq(1)
53
53
  expect(response.per_page).to be_a(Integer)
54
54
  expect(response.total_entries).to be_a(Integer)
@@ -108,11 +108,14 @@ describe Dnsimple::Client, ".certificates" do
108
108
  expect(result).to be_a(Dnsimple::Struct::Certificate)
109
109
  expect(result.id).to eq(1)
110
110
  expect(result.domain_id).to eq(2)
111
+ expect(result.contact_id).to eq(3)
111
112
  expect(result.common_name).to eq("www.weppos.net")
113
+ expect(result.alternate_names).to eq(%w( weppos.net www.weppos.net ))
112
114
  expect(result.years).to eq(1)
113
115
  expect(result.csr).to eq("-----BEGIN CERTIFICATE REQUEST-----\nMIICljCCAX4CAQAwGTEXMBUGA1UEAwwOd3d3LndlcHBvcy5uZXQwggEiMA0GCSqG\nSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3MJwx9ahBG3kAwRjQdRvYZqtovUaxY6jp\nhd09975gO+2eYPDbc1yhNftVJ4KBT0zdEqzX0CwIlxE1MsnZ2YOsC7IJO531hMBp\ndBxM4tSG07xPz70AVUi9rY6YCUoJHmxoFbclpHFbtXZocR393WyzUK8047uM2mlz\n03AZKcMdyfeuo2/9TcxpTSCkklGqwqS9wtTogckaDHJDoBunAkMioGfOSMe7Yi6E\nYRtG4yPJYsDaq2yPJWV8+i0PFR1Wi5RCnPt0YdQWstHuZrxABi45+XVkzKtz3TUc\nYxrvPBucVa6uzd953u8CixNFkiOefvb/dajsv1GIwH6/Cvc1ftz1AgMBAAGgODA2\nBgkqhkiG9w0BCQ4xKTAnMCUGA1UdEQQeMByCDnd3dy53ZXBwb3MubmV0ggp3ZXBw\nb3MubmV0MA0GCSqGSIb3DQEBCwUAA4IBAQCDnVBO9RdJX0eFeZzlv5c8yG8duhKP\nl0Vl+V88fJylb/cbNj9qFPkKTK0vTXmS2XUFBChKPtLucp8+Z754UswX+QCsdc7U\nTTSG0CkyilcSubdZUERGej1XfrVQhrokk7Fu0Jh3BdT6REP0SIDTpA8ku/aRQiAp\np+h19M37S7+w/DMGDAq2LSX8jOpJ1yIokRDyLZpmwyLxutC21DXMGoJ3xZeUFrUT\nqRNwzkn2dJzgTrPkzhaXalUBqv+nfXHqHaWljZa/O0NVCFrHCdTdd53/6EE2Yabv\nq5SFTkRCpaxrvM/7a8Tr4ixD1/VKD6rw3+WC00000000000000000000\n-----END CERTIFICATE REQUEST-----\n")
114
116
  expect(result.state).to eq("issued")
115
117
  expect(result.authority_identifier).to eq("letsencrypt")
118
+ expect(result.auto_renew).to be(false)
116
119
  expect(result.created_at).to eq("2016-06-11T18:47:08Z")
117
120
  expect(result.updated_at).to eq("2016-06-11T18:47:37Z")
118
121
  expect(result.expires_on).to eq("2016-09-09")
@@ -224,4 +227,225 @@ describe Dnsimple::Client, ".certificates" do
224
227
  end
225
228
  end
226
229
 
230
+ describe "#purchase_letsencrypt_certificate" do
231
+ let(:account_id) { 1010 }
232
+ let(:domain_id) { "example.com" }
233
+ let(:contact_id) { 100 }
234
+
235
+ before do
236
+ stub_request(:post, %r{/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt})
237
+ .to_return(read_http_fixture("purchaseLetsencryptCertificate/success.http"))
238
+ end
239
+
240
+ it "builds the correct request" do
241
+ attributes = { contact_id: contact_id }
242
+ subject.purchase_letsencrypt_certificate(account_id, domain_id, attributes)
243
+
244
+ expect(WebMock).to have_requested(:post, "https://api.dnsimple.test/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt")
245
+ .with(body: attributes)
246
+ .with(headers: { 'Accept' => 'application/json' })
247
+ end
248
+
249
+ it "passes extra attributes" do
250
+ attributes = { contact_id: contact_id, name: "www", auto_renew: true, alternate_names: ["api.example.com"] }
251
+ subject.purchase_letsencrypt_certificate(account_id, domain_id, attributes)
252
+
253
+ expect(WebMock).to have_requested(:post, "https://api.dnsimple.test/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt")
254
+ .with(body: attributes)
255
+ .with(headers: { 'Accept' => 'application/json' })
256
+ end
257
+
258
+ it "returns the certificate purchase" do
259
+ response = subject.purchase_letsencrypt_certificate(account_id, domain_id, contact_id: contact_id)
260
+ expect(response).to be_a(Dnsimple::Response)
261
+
262
+ result = response.data
263
+ expect(result).to be_a(Dnsimple::Struct::CertificatePurchase)
264
+
265
+ expect(result.id).to eq(300)
266
+ expect(result.certificate_id).to eq(300)
267
+ expect(result.state).to eq("requesting")
268
+ expect(result.auto_renew).to be(false)
269
+ end
270
+
271
+ context "when the domain does not exist" do
272
+ it "raises NotFoundError" do
273
+ stub_request(:post, %r{/v2})
274
+ .to_return(read_http_fixture("notfound-domain.http"))
275
+
276
+ expect {
277
+ subject.purchase_letsencrypt_certificate(account_id, domain_id, contact_id: contact_id)
278
+ }.to raise_error(Dnsimple::NotFoundError)
279
+ end
280
+ end
281
+ end
282
+
283
+ describe "#issue_letsencrypt_certificate" do
284
+ let(:account_id) { 1010 }
285
+ let(:domain_id) { "example.com" }
286
+ let(:certificate_id) { 200 }
287
+
288
+ before do
289
+ stub_request(:post, %r{/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt/#{certificate_id}/issue})
290
+ .to_return(read_http_fixture("issueLetsencryptCertificate/success.http"))
291
+ end
292
+
293
+ it "builds the correct request" do
294
+ subject.issue_letsencrypt_certificate(account_id, domain_id, certificate_id)
295
+
296
+ expect(WebMock).to have_requested(:post, "https://api.dnsimple.test/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt/#{certificate_id}/issue")
297
+ .with(headers: { 'Accept' => 'application/json' })
298
+ end
299
+
300
+ it "returns the certificate" do
301
+ response = subject.issue_letsencrypt_certificate(account_id, domain_id, certificate_id)
302
+ expect(response).to be_a(Dnsimple::Response)
303
+
304
+ result = response.data
305
+ expect(result).to be_a(Dnsimple::Struct::Certificate)
306
+
307
+ expect(result.id).to eq(200)
308
+ expect(result.domain_id).to eq(300)
309
+ expect(result.common_name).to eq("www.example.com")
310
+ expect(result.alternate_names).to eq([])
311
+ expect(result.years).to eq(1)
312
+ expect(result.csr).to be(nil)
313
+ expect(result.state).to eq("requesting")
314
+ expect(result.authority_identifier).to eq("letsencrypt")
315
+ expect(result.auto_renew).to be(false)
316
+ end
317
+
318
+ context "when the domain does not exist" do
319
+ it "raises NotFoundError" do
320
+ stub_request(:post, %r{/v2})
321
+ .to_return(read_http_fixture("notfound-domain.http"))
322
+
323
+ expect {
324
+ subject.issue_letsencrypt_certificate(account_id, domain_id, certificate_id)
325
+ }.to raise_error(Dnsimple::NotFoundError)
326
+ end
327
+ end
328
+
329
+ context "when the certificate does not exist" do
330
+ it "raises NotFoundError" do
331
+ stub_request(:post, %r{/v2})
332
+ .to_return(read_http_fixture("notfound-certificate.http"))
333
+
334
+ expect {
335
+ subject.issue_letsencrypt_certificate(account_id, domain_id, certificate_id)
336
+ }.to raise_error(Dnsimple::NotFoundError)
337
+ end
338
+ end
339
+ end
340
+
341
+ describe "#purchase_letsencrypt_certificate_renewal" do
342
+ let(:account_id) { 1010 }
343
+ let(:domain_id) { "example.com" }
344
+ let(:certificate_id) { 200 }
345
+
346
+ before do
347
+ stub_request(:post, %r{/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt/#{certificate_id}/renewals})
348
+ .to_return(read_http_fixture("purchaseRenewalLetsencryptCertificate/success.http"))
349
+ end
350
+
351
+ it "builds the correct request" do
352
+ subject.purchase_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id)
353
+
354
+ expect(WebMock).to have_requested(:post, "https://api.dnsimple.test/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt/#{certificate_id}/renewals")
355
+ .with(headers: { 'Accept' => 'application/json' })
356
+ end
357
+
358
+ it "passes extra attributes" do
359
+ attributes = { auto_renew: true }
360
+ subject.purchase_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id, attributes)
361
+
362
+ expect(WebMock).to have_requested(:post, "https://api.dnsimple.test/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt/#{certificate_id}/renewals")
363
+ .with(body: attributes)
364
+ .with(headers: { 'Accept' => 'application/json' })
365
+ end
366
+
367
+ it "returns the certificate renew" do
368
+ response = subject.purchase_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id)
369
+ expect(response).to be_a(Dnsimple::Response)
370
+
371
+ result = response.data
372
+ expect(result).to be_a(Dnsimple::Struct::CertificateRenewal)
373
+
374
+ expect(result.id).to eq(999)
375
+ expect(result.old_certificate_id).to eq(certificate_id)
376
+ expect(result.new_certificate_id).to eq(300)
377
+ expect(result.state).to eq("new")
378
+ end
379
+
380
+ context "when the domain does not exist" do
381
+ it "raises NotFoundError" do
382
+ stub_request(:post, %r{/v2})
383
+ .to_return(read_http_fixture("notfound-domain.http"))
384
+
385
+ expect {
386
+ subject.purchase_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id)
387
+ }.to raise_error(Dnsimple::NotFoundError)
388
+ end
389
+ end
390
+ end
391
+
392
+ describe "#issue_letsencrypt_certificate_renewal" do
393
+ let(:account_id) { 1010 }
394
+ let(:domain_id) { "example.com" }
395
+ let(:certificate_id) { 300 }
396
+ let(:certificate_renewal_id) { 999 }
397
+
398
+ before do
399
+ stub_request(:post, %r{/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt/#{certificate_id}/renewals/#{certificate_renewal_id}/issue})
400
+ .to_return(read_http_fixture("issueRenewalLetsencryptCertificate/success.http"))
401
+ end
402
+
403
+ it "builds the correct request" do
404
+ subject.issue_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id, certificate_renewal_id)
405
+
406
+ expect(WebMock).to have_requested(:post, "https://api.dnsimple.test/v2/#{account_id}/domains/#{domain_id}/certificates/letsencrypt/#{certificate_id}/renewals/#{certificate_renewal_id}/issue")
407
+ .with(headers: { 'Accept' => 'application/json' })
408
+ end
409
+
410
+ it "returns the certificate" do
411
+ response = subject.issue_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id, certificate_renewal_id)
412
+ expect(response).to be_a(Dnsimple::Response)
413
+
414
+ result = response.data
415
+ expect(result).to be_a(Dnsimple::Struct::Certificate)
416
+
417
+ expect(result.id).to eq(300)
418
+ expect(result.domain_id).to eq(300)
419
+ expect(result.common_name).to eq("www.example.com")
420
+ expect(result.alternate_names).to eq([])
421
+ expect(result.years).to eq(1)
422
+ expect(result.csr).to be(nil)
423
+ expect(result.state).to eq("requesting")
424
+ expect(result.authority_identifier).to eq("letsencrypt")
425
+ expect(result.auto_renew).to be(false)
426
+ end
427
+
428
+ context "when the domain does not exist" do
429
+ it "raises NotFoundError" do
430
+ stub_request(:post, %r{/v2})
431
+ .to_return(read_http_fixture("notfound-domain.http"))
432
+
433
+ expect {
434
+ subject.issue_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id, certificate_renewal_id)
435
+ }.to raise_error(Dnsimple::NotFoundError)
436
+ end
437
+ end
438
+
439
+ context "when the certificate does not exist" do
440
+ it "raises NotFoundError" do
441
+ stub_request(:post, %r{/v2})
442
+ .to_return(read_http_fixture("notfound-certificate.http"))
443
+
444
+ expect {
445
+ subject.issue_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id, certificate_renewal_id)
446
+ }.to raise_error(Dnsimple::NotFoundError)
447
+ end
448
+ end
449
+ end
450
+
227
451
  end
@@ -49,7 +49,7 @@ describe Dnsimple::Client, ".domains" do
49
49
  it "exposes the pagination information" do
50
50
  response = subject.collaborators(account_id, domain_id)
51
51
 
52
- expect(response.respond_to?(:page)).to be_truthy
52
+ expect(response.respond_to?(:page)).to be(true)
53
53
  expect(response.page).to eq(1)
54
54
  expect(response.per_page).to be_a(Integer)
55
55
  expect(response.total_entries).to be_a(Integer)
@@ -54,7 +54,7 @@ describe Dnsimple::Client, ".contacts" do
54
54
  it "exposes the pagination information" do
55
55
  response = subject.contacts(account_id)
56
56
 
57
- expect(response.respond_to?(:page)).to be_truthy
57
+ expect(response.respond_to?(:page)).to be(true)
58
58
  expect(response.page).to eq(1)
59
59
  expect(response.per_page).to be_a(Integer)
60
60
  expect(response.total_entries).to be_a(Integer)
@@ -55,7 +55,7 @@ describe Dnsimple::Client, ".domains" do
55
55
  it "exposes the pagination information" do
56
56
  response = subject.delegation_signer_records(account_id, domain_id)
57
57
 
58
- expect(response.respond_to?(:page)).to be_truthy
58
+ expect(response.respond_to?(:page)).to be(true)
59
59
  expect(response.page).to eq(1)
60
60
  expect(response.per_page).to be_a(Integer)
61
61
  expect(response.total_entries).to be_a(Integer)
@@ -27,7 +27,7 @@ describe Dnsimple::Client, ".domains" do
27
27
 
28
28
  result = response.data
29
29
  expect(result).to be_a(Dnsimple::Struct::Dnssec)
30
- expect(result.enabled).to be_truthy
30
+ expect(result.enabled).to be(true)
31
31
  end
32
32
 
33
33
  context "when the domain does not exist" do
@@ -103,7 +103,7 @@ describe Dnsimple::Client, ".domains" do
103
103
 
104
104
  result = response.data
105
105
  expect(result).to be_a(Dnsimple::Struct::Dnssec)
106
- expect(result.enabled).to be_truthy
106
+ expect(result.enabled).to be(true)
107
107
  end
108
108
 
109
109
  context "when the domain does not exist" do