Skip to content

Commit

Permalink
Update Card test
Browse files Browse the repository at this point in the history
  • Loading branch information
AnasNaouchi committed Sep 5, 2024
1 parent 1be0d67 commit 5d102da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/test/java/co/omise/requests/TokenRequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ public void testCreate() throws IOException, OmiseException {
.expiration(YearMonth.now().plusYears(1))
.securityCode("123")
.city("Bangkok")
.postalCode("10240"))
.postalCode("10240")
.email("email@opn.ooo")
)
.build();

Token token = getTestRequester().sendRequest(request);

assertRequested("POST", "/tokens", 200);
assertVaultRequest();
assertRequestBody("{\"card\":{\"city\":\"Bangkok\",\"country\":null,\"name\":\"JOHN DOE\",\"number\":\"4242424242424242\",\"state\":null,\"street1\":null,\"street2\":null,\"email\":\"email@opn.ooo\",\"expiration_month\":9,\"expiration_year\":2025,\"phone_number\":null,\"postal_code\":\"10240\",\"security_code\":\"123\"}}");

assertEquals(TOKEN_ID, token.getId());
assertFalse(token.isLiveMode());
Expand Down

0 comments on commit 5d102da

Please sign in to comment.