Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
ntqdinh-axonivy committed Jul 26, 2024
1 parent 4dc6a9b commit c83cd3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public ProductDetailModelAssembler(ProductModelAssembler productModelAssembler)

@Override
public ProductDetailModel toModel(Product product) {
return createModel(product, null);
return createModel(product, StringUtils.EMPTY);
}

public ProductDetailModel toModel(Product product, String version) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ProductDetailsControllerTest {
@Test
void testProductDetails() {
Mockito.when(productService.fetchProductDetail(Mockito.anyString())).thenReturn(mockProduct());
Mockito.when(detailModelAssembler.toModel(mockProduct(), null)).thenReturn(createProductMockWithDetails());
Mockito.when(detailModelAssembler.toModel(mockProduct())).thenReturn(createProductMockWithDetails());
ResponseEntity<ProductDetailModel> mockExpectedResult = new ResponseEntity<>(createProductMockWithDetails(),
HttpStatus.OK);

Expand Down

0 comments on commit c83cd3e

Please sign in to comment.