Skip to content

Commit

Permalink
Change: update test fixture for list and adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ggalmazor committed May 17, 2024
1 parent d81d0b3 commit f4508db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public void testListEmailForwardsSupportsSorting() {
public void testListEmailForwardsProducesDomainList() {
server.stubFixtureAt("listEmailForwards/success.http");
PaginatedResponse<EmailForward> response = client.domains.listEmailForwards(1, "example.com");
assertThat(response.getData(), hasSize(2));
assertThat(response.getData().get(0).getId(), is(17702L));
assertThat(response.getData(), hasSize(1));
assertThat(response.getData().get(0).getId(), is(24809L));
}

@Test
Expand Down
20 changes: 10 additions & 10 deletions src/test/resources/com/dnsimple/listEmailForwards/success.http
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 04 Feb 2016 14:07:19 GMT
Date: Fri, 17 May 2024 09:07:28 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Status: 200 OK
X-RateLimit-Limit: 4000
X-RateLimit-Remaining: 3993
X-RateLimit-Reset: 1454596043
ETag: W/"3f10aae0cf0f0b81bdb4f58786ee1750"
X-RateLimit-Limit: 4800
X-RateLimit-Remaining: 4748
X-RateLimit-Reset: 1715936948
X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs
ETag: W/"a5eed9a071f03e10fc67001ccc647a94"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 6e3aa9d0-cb95-4186-93b0-630da372de86
X-Runtime: 0.026287
Strict-Transport-Security: max-age=31536000
X-Request-Id: e42df983-a8a5-4123-8c74-fb89ab934aba
X-Runtime: 0.025456
Strict-Transport-Security: max-age=63072000

{"data":[{"id":17702,"domain_id":228963,"from":".*@a-domain.com","to":"[email protected]","created_at":"2016-02-04T13:59:29Z","updated_at":"2016-02-04T13:59:29Z"},{"id":17703,"domain_id":228963,"from":"john@a-domain.com","to":"john@example.com","created_at":"2016-02-04T14:07:13Z","updated_at":"2016-02-04T14:07:13Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}}
{"data":[{"id":24809,"domain_id":235146,"alias_email":".*@a-domain.com","destination_email":"[email protected]","created_at":"2017-05-25T19:23:16Z","updated_at":"2017-05-25T19:23:16Z","from":".*@a-domain.com","to":"jane.smith@example.com"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}

0 comments on commit f4508db

Please sign in to comment.