Commit b3798ff3 authored by Khai Yuan ​Liew's avatar Khai Yuan ​Liew

[AFP-55] Update Product Test Controller

parent 46d00c86
package com.nisum.ascend.inventory.controller;
import com.nisum.ascend.inventory.dto.ProductDto;
import com.nisum.ascend.inventory.model.Product;
import io.swagger.models.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -12,7 +10,7 @@ import com.nisum.ascend.inventory.service.ProductService;
import reactor.core.publisher.Flux;
@RestController
@RequestMapping("/products")
@RequestMapping("/api/products")
public class ProductController {
@Autowired
ProductService productService;
......
package com.nisum.ascend.inventory;
package com.nisum.ascend.inventory.controller;
import com.nisum.ascend.inventory.controller.ProductController;
import com.nisum.ascend.inventory.model.Product;
......@@ -36,7 +36,7 @@ class ProductControllerTest {
@Test
void testFindAllProducts(){
webTestClient.get()
.uri("http://localhost:8080/products")
.uri("/api/products")
.header(HttpHeaders.ACCEPT, "application/json")
.exchange()
.expectStatus().isOk()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment