File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/test/java/uk/gov/companieshouse/orders/api/controller Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1212import org .springframework .http .MediaType ;
1313import org .springframework .test .web .servlet .MockMvc ;
1414import uk .gov .companieshouse .orders .api .dto .AddToBasketRequestDTO ;
15+ import uk .gov .companieshouse .orders .api .dto .BasketPaymentRequestDTO ;
1516import uk .gov .companieshouse .orders .api .model .Basket ;
1617import uk .gov .companieshouse .orders .api .model .BasketData ;
1718import uk .gov .companieshouse .orders .api .model .BasketItem ;
@@ -240,11 +241,16 @@ public void checkoutBasketReturnsBadRequestIfBodyIsPresent() throws Exception {
240241 @ Test
241242 @ DisplayName ("Patch basket payment details returns OK" )
242243 public void patchBasketPaymentDetailsReturnsOK () throws Exception {
244+ BasketPaymentRequestDTO basketPaymentRequestDTO = new BasketPaymentRequestDTO ();
245+ basketPaymentRequestDTO .setPaidAt ("paid-at" );
246+ basketPaymentRequestDTO .setPaymentReference ("reference" );
247+ basketPaymentRequestDTO .setStatus ("status" );
248+
243249 mockMvc .perform (patch ("/basket/payment/1234" )
244250 .header (REQUEST_ID_HEADER_NAME , TOKEN_REQUEST_ID_VALUE )
245251 .header (ERIC_IDENTITY_HEADER_NAME , ERIC_IDENTITY_VALUE )
246252 .contentType (MediaType .APPLICATION_JSON )
247- .content ("{}" ))
253+ .content (mapper . writeValueAsString ( basketPaymentRequestDTO ) ))
248254 .andExpect (status ().isOk ());
249255 }
250256}
You can’t perform that action at this time.
0 commit comments