diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48ec6ba4..b1f26a49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: - name: Test run: |- export TERM=${TERM:-dumb} - ./gradlew test + ./gradlew test --debug # test build - name: Build with Gradle run: ./gradlew build diff --git a/src/test/java/com/gocardless/GoCardlessClientTest.java b/src/test/java/com/gocardless/GoCardlessClientTest.java index 5f5bc806..23a59fac 100644 --- a/src/test/java/com/gocardless/GoCardlessClientTest.java +++ b/src/test/java/com/gocardless/GoCardlessClientTest.java @@ -108,7 +108,7 @@ public void shouldCreateACustomer() throws Exception { http.enqueueResponse(201, "fixtures/client/create_a_customer_response.json"); Customer customer = client.customers().create().withHeader("Accept-Language", "fr-FR") .withFamilyName("Osborne").withGivenName("Sharon").withAddressLine1("27 Acer Road") - .withAddressLine2("Apt 2").withCity("London").withPostalCode("E8 3GX") + .withAddressLine2("Apt 2").withCity("London").withPostalCode("E8 3GX").withEmail("test-email@gmail.com") .withCountryCode("GB").execute(); assertThat(customer.getId()).isNotNull(); assertThat(customer.getFamilyName()).isEqualTo("Osborne"); @@ -122,7 +122,7 @@ public void shouldCreateACustomer() throws Exception { public void shouldCreateACustomerWithAGeneratedIdempotencyKey() throws Exception { http.enqueueResponse(201, "fixtures/client/create_a_customer_response.json"); CustomerCreateRequest request = client.customers().create() - .withHeader("Accept-Language", "fr-FR").withFamilyName("Osborne") + .withHeader("Accept-Language", "fr-FR").withFamilyName("Osborne").withEmail("test-email@gmail.com") .withGivenName("Sharon").withAddressLine1("27 Acer Road").withAddressLine2("Apt 2") .withCity("London").withPostalCode("E8 3GX").withCountryCode("GB"); request.execute(); @@ -139,7 +139,7 @@ public void shouldHandleConflictWhenCreatingACustomer() throws Exception { http.enqueueResponse(409, "fixtures/conflict.json"); http.enqueueResponse(200, "fixtures/client/create_a_customer_response.json"); CustomerCreateRequest request = client.customers().create() - .withHeader("Accept-Language", "fr-FR").withFamilyName("Osborne") + .withHeader("Accept-Language", "fr-FR").withFamilyName("Osborne").withEmail("test-email@gmail.com") .withGivenName("Sharon").withAddressLine1("27 Acer Road").withAddressLine2("Apt 2") .withCity("London").withPostalCode("E8 3GX").withCountryCode("GB"); request.execute(); diff --git a/src/test/resources/fixtures/client/create_a_customer_request.json b/src/test/resources/fixtures/client/create_a_customer_request.json index 94c339bb..178be6c5 100644 --- a/src/test/resources/fixtures/client/create_a_customer_request.json +++ b/src/test/resources/fixtures/client/create_a_customer_request.json @@ -4,6 +4,7 @@ "address_line2": "Apt 2", "city": "London", "country_code": "GB", + "email": "test-email@gmail.com", "family_name": "Osborne", "given_name": "Sharon", "postal_code": "E8 3GX"