Skip to content

Commit

Permalink
Fix webhooks tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo committed Oct 2, 2024
1 parent 84121fd commit d65dcf7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,23 @@ public void responseWithStatus200Test() throws ApiException {
assertThat(page.getCurrentPage()).isEqualTo(1);
assertThat(page.getPageSize()).isEqualTo(25);
assertThat(page.getPagesTotal()).isEqualTo(1);
assertThat(page.getCurrentPageItems()).isEqualTo(11);
assertThat(page.getCurrentPageItems()).isEqualTo(2);

assertThat(page.getItems()).hasSize(2);

assertThat(page.getItems()).containsExactlyElementsIn(Arrays.asList(
new Webhook().webhookId("webhook_XXXXXXXXXXXXXXX")
.createdAt(OffsetDateTime.parse("2021-01-08T14:12:18.000+00:00"))
.addEventsItem("video.encoding.quality.completed")
.url("http://clientnotificationserver.com/notif?myquery=query"),
.url("http://clientnotificationserver.com/notif?myquery=query")
.signatureSecret("sig_sec_Abcd12348RLP7VPLi7nYVh"),
new Webhook().webhookId("webhook_XXXXXXXXXYYYYYY")
.createdAt(OffsetDateTime.parse("2021-01-12T12:12:12.000+00:00"))
.addEventsItem("video.encoding.quality.completed")
.url("http://clientnotificationserver.com/notif?myquery=query2")))
.url("http://clientnotificationserver.com/notif?myquery=query2")
.signatureSecret("sig_sec_Abcd12358RLP7VPLi7nYVy"));
.inOrder();

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,21 @@ public void responseWithStatus200Test() throws ApiException {
assertThat(page.getCurrentPage()).isEqualTo(1);
assertThat(page.getPageSize()).isEqualTo(25);
assertThat(page.getPagesTotal()).isEqualTo(1);
assertThat(page.getCurrentPageItems()).isEqualTo(11);
assertThat(page.getCurrentPageItems()).isEqualTo(2);

assertThat(page.getItems()).hasSize(2);

assertThat(page.getItems()).containsExactlyInAnyOrder(
new Webhook().webhookId("webhook_XXXXXXXXXXXXXXX")
.createdAt(OffsetDateTime.parse("2021-01-08T14:12:18.000+00:00"))
.addEventsItem("video.encoding.quality.completed")
.url("http://clientnotificationserver.com/notif?myquery=query"),
.url("http://clientnotificationserver.com/notif?myquery=query")
.signatureSecret("sig_sec_Abcd12348RLP7VPLi7nYVh"),
new Webhook().webhookId("webhook_XXXXXXXXXYYYYYY")
.createdAt(OffsetDateTime.parse("2021-01-12T12:12:12.000+00:00"))
.addEventsItem("video.encoding.quality.completed")
.url("http://clientnotificationserver.com/notif?myquery=query2"));
.url("http://clientnotificationserver.com/notif?myquery=query2")
.signatureSecret("sig_sec_Abcd12358RLP7VPLi7nYVy"));
}
}

Expand Down

0 comments on commit d65dcf7

Please sign in to comment.