diff --git a/spec/dnsimple/client/registrar_spec.rb b/spec/dnsimple/client/registrar_spec.rb index 265248f6..19ab3bec 100644 --- a/spec/dnsimple/client/registrar_spec.rb +++ b/spec/dnsimple/client/registrar_spec.rb @@ -223,27 +223,27 @@ end it "builds the correct request" do - subject.get_domain_transfer(account_id, domain_name = "example.com", transfer_id = 42) + subject.get_domain_transfer(account_id, domain_name = "example.com", transfer_id = 361) expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/registrar/domains/#{domain_name}/transfers/#{transfer_id}") .with(headers: { "Accept" => "application/json" }) end it "returns the domain transfer" do - response = subject.get_domain_transfer(account_id, "example.com", 42) + response = subject.get_domain_transfer(account_id, "example.com", 361) expect(response).to be_a(Dnsimple::Response) result = response.data expect(result).to be_a(Dnsimple::Struct::DomainTransfer) - expect(result.id).to eq(42) - expect(result.domain_id).to eq(2) - expect(result.registrant_id).to eq(3) + expect(result.id).to eq(361) + expect(result.domain_id).to eq(182245) + expect(result.registrant_id).to eq(2715) expect(result.state).to eq("cancelled") expect(result.auto_renew).to be(false) expect(result.whois_privacy).to be(false) expect(result.status_description).to eq("Canceled by customer") - expect(result.created_at).to eq("2020-04-27T18:08:44Z") - expect(result.updated_at).to eq("2020-04-27T18:20:01Z") + expect(result.created_at).to eq("2020-06-05T18:08:00Z") + expect(result.updated_at).to eq("2020-06-05T18:10:01Z") end end @@ -256,27 +256,27 @@ end it "builds the correct request" do - subject.cancel_domain_transfer(account_id, domain_name = "example.com", transfer_id = 42) + subject.cancel_domain_transfer(account_id, domain_name = "example.com", transfer_id = 361) expect(WebMock).to have_requested(:delete, "https://api.dnsimple.test/v2/#{account_id}/registrar/domains/#{domain_name}/transfers/#{transfer_id}") .with(headers: { "Accept" => "application/json" }) end it "returns the domain transfer" do - response = subject.cancel_domain_transfer(account_id, "example.com", 42) + response = subject.cancel_domain_transfer(account_id, "example.com", 361) expect(response).to be_a(Dnsimple::Response) result = response.data expect(result).to be_a(Dnsimple::Struct::DomainTransfer) - expect(result.id).to eq(42) - expect(result.domain_id).to eq(6) - expect(result.registrant_id).to eq(1) + expect(result.id).to eq(361) + expect(result.domain_id).to eq(182245) + expect(result.registrant_id).to eq(2715) expect(result.state).to eq("transferring") - expect(result.auto_renew).to be(true) + expect(result.auto_renew).to be(false) expect(result.whois_privacy).to be(false) expect(result.status_description).to eq(nil) - expect(result.created_at).to eq("2020-04-24T19:19:03Z") - expect(result.updated_at).to eq("2020-04-24T19:19:15Z") + expect(result.created_at).to eq("2020-06-05T18:08:00Z") + expect(result.updated_at).to eq("2020-06-05T18:08:04Z") end end diff --git a/spec/fixtures.http/cancelDomainTransfer/success.http b/spec/fixtures.http/cancelDomainTransfer/success.http index f3d2aa10..80c99823 100644 --- a/spec/fixtures.http/cancelDomainTransfer/success.http +++ b/spec/fixtures.http/cancelDomainTransfer/success.http @@ -1,30 +1,19 @@ -HTTP/1.1 202 Accepted -Server: nginx -Date: Wed, 29 Apr 2020 19:49:41 GMT -Content-Type: application/json; charset=utf-8 -Transfer-Encoding: chunked -Connection: keep-alive -Status: 202 Accepted -X-RateLimit-Limit: 2400 -X-RateLimit-Remaining: 2397 -X-RateLimit-Reset: 1588193270 -ETag: W/"8404bf2739e44e9f69f3a5199466776d" -Cache-Control: no-store, must-revalidate, private, max-age=0 -X-Request-Id: 10d75bcf-0066-4d38-98a2-dc18dd5b6f4c -X-Runtime: 1.752154 -Strict-Transport-Security: max-age=31536000 - -{ - "data": { - "id": 42, - "domain_id": 6, - "registrant_id": 1, - "state": "transferring", - "auto_renew": true, - "whois_privacy": false, - "premium_price": null, - "status_description": null, - "created_at": "2020-04-24T19:19:03Z", - "updated_at": "2020-04-24T19:19:15Z" - } -} +HTTP/1.1 202 Accepted +Server: nginx +Date: Fri, 05 Jun 2020 18:09:42 GMT +Content-Type: application/json; charset=utf-8 +Transfer-Encoding: identity +Connection: keep-alive +X-RateLimit-Limit: 2400 +X-RateLimit-Remaining: 2394 +X-RateLimit-Reset: 1591384034 +Cache-Control: no-cache +X-Request-Id: 3cf6dcfa-0bb5-439e-863a-af2ef08bc830 +X-Runtime: 0.912731 +X-Frame-Options: DENY +X-Content-Type-Options: nosniff +X-XSS-Protection: 1; mode=block +X-Download-Options: noopen +X-Permitted-Cross-Domain-Policies: none + +{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"transferring","auto_renew":false,"whois_privacy":false,"status_description":null,"created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:08:04Z"}} diff --git a/spec/fixtures.http/getDomainTransfer/success.http b/spec/fixtures.http/getDomainTransfer/success.http index 202ee6ca..894f9792 100644 --- a/spec/fixtures.http/getDomainTransfer/success.http +++ b/spec/fixtures.http/getDomainTransfer/success.http @@ -1,30 +1,21 @@ -HTTP/1.1 200 OK -Server: nginx -Date: Mon, 27 Apr 2020 19:40:00 GMT -Content-Type: application/json; charset=utf-8 -Transfer-Encoding: chunked -Connection: keep-alive -Status: 200 OK -X-RateLimit-Limit: 2400 -X-RateLimit-Remaining: 2398 -X-RateLimit-Reset: 1588019949 -ETag: W/"8404bf2739e44e9f69f3a5199466776d" -Cache-Control: max-age=0, private, must-revalidate -X-Request-Id: 4818d867-1f72-4619-ab46-d345e6dd25eb -X-Runtime: 0.092854 -Strict-Transport-Security: max-age=31536000 - -{ - "data": { - "id": 42, - "domain_id": 2, - "registrant_id": 3, - "state": "cancelled", - "auto_renew": false, - "whois_privacy": false, - "premium_price": null, - "status_description": "Canceled by customer", - "created_at": "2020-04-27T18:08:44Z", - "updated_at": "2020-04-27T18:20:01Z" - } -} +HTTP/1.1 200 OK +Server: nginx +Date: Fri, 05 Jun 2020 18:23:53 GMT +Content-Type: application/json; charset=utf-8 +Transfer-Encoding: identity +Connection: keep-alive +X-RateLimit-Limit: 2400 +X-RateLimit-Remaining: 2392 +X-RateLimit-Reset: 1591384034 +ETag: W/"80c5827934c13b1ca87a587d96e7d1e8" +Cache-Control: max-age=0, private, must-revalidate +X-Request-Id: 9f4959ee-06a9-488c-906e-27a570cafbbf +X-Runtime: 0.078429 +X-Frame-Options: DENY +X-Content-Type-Options: nosniff +X-XSS-Protection: 1; mode=block +X-Download-Options: noopen +X-Permitted-Cross-Domain-Policies: none +Strict-Transport-Security: max-age=31536000 + +{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"cancelled","auto_renew":false,"whois_privacy":false,"status_description":"Canceled by customer","created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:10:01Z"}} diff --git a/spec/fixtures.http/registerDomain/success.http b/spec/fixtures.http/registerDomain/success.http index de290c28..90816e6a 100644 --- a/spec/fixtures.http/registerDomain/success.http +++ b/spec/fixtures.http/registerDomain/success.http @@ -2,7 +2,7 @@ HTTP/1.1 201 Created Server: nginx Date: Fri, 09 Dec 2016 19:35:38 GMT Content-Type: application/json; charset=utf-8 -Transfer-Encoding: chunked +Transfer-Encoding: identity Connection: keep-alive X-RateLimit-Limit: 2400 X-RateLimit-Remaining: 2396 @@ -18,4 +18,4 @@ X-Permitted-Cross-Domain-Policies: none X-XSS-Protection: 1; mode=block Strict-Transport-Security: max-age=31536000 -{"data":{"id":1,"domain_id":999,"registrant_id":2,"period":1,"state":"new","auto_renew":false,"whois_privacy":false,"premium_price":null,"created_at":"2016-12-09T19:35:31Z","updated_at":"2016-12-09T19:35:31Z"}} +{"data":{"id":1,"domain_id":999,"registrant_id":2,"period":1,"state":"new","auto_renew":false,"whois_privacy":false,"created_at":"2016-12-09T19:35:31Z","updated_at":"2016-12-09T19:35:31Z"}} diff --git a/spec/fixtures.http/renewDomain/success.http b/spec/fixtures.http/renewDomain/success.http index 51b68d42..3a2cd8a7 100644 --- a/spec/fixtures.http/renewDomain/success.http +++ b/spec/fixtures.http/renewDomain/success.http @@ -2,7 +2,7 @@ HTTP/1.1 201 Created Server: nginx Date: Fri, 09 Dec 2016 19:46:57 GMT Content-Type: application/json; charset=utf-8 -Transfer-Encoding: chunked +Transfer-Encoding: identity Connection: keep-alive X-RateLimit-Limit: 2400 X-RateLimit-Remaining: 2394 @@ -18,4 +18,4 @@ X-Permitted-Cross-Domain-Policies: none X-XSS-Protection: 1; mode=block Strict-Transport-Security: max-age=31536000 -{"data":{"id":1,"domain_id":999,"period":1,"state":"new","premium_price":null,"created_at":"2016-12-09T19:46:45Z","updated_at":"2016-12-09T19:46:45Z"}} +{"data":{"id":1,"domain_id":999,"period":1,"state":"new","created_at":"2016-12-09T19:46:45Z","updated_at":"2016-12-09T19:46:45Z"}} diff --git a/spec/fixtures.http/transferDomain/success.http b/spec/fixtures.http/transferDomain/success.http index b1496e59..ecce066b 100644 --- a/spec/fixtures.http/transferDomain/success.http +++ b/spec/fixtures.http/transferDomain/success.http @@ -2,7 +2,7 @@ HTTP/1.1 201 Created Server: nginx Date: Fri, 09 Dec 2016 19:43:43 GMT Content-Type: application/json; charset=utf-8 -Transfer-Encoding: chunked +Transfer-Encoding: identity Connection: keep-alive X-RateLimit-Limit: 2400 X-RateLimit-Remaining: 2395 @@ -18,4 +18,4 @@ X-Permitted-Cross-Domain-Policies: none X-XSS-Protection: 1; mode=block Strict-Transport-Security: max-age=31536000 -{"data":{"id":1,"domain_id":999,"registrant_id":2,"state":"transferring","auto_renew":false,"whois_privacy":false,"premium_price":null,"created_at":"2016-12-09T19:43:41Z","updated_at":"2016-12-09T19:43:43Z"}} +{"data":{"id":1,"domain_id":999,"registrant_id":2,"state":"transferring","auto_renew":false,"whois_privacy":false,"created_at":"2016-12-09T19:43:41Z","updated_at":"2016-12-09T19:43:43Z"}}