Skip to content

Commit

Permalink
feat: update workspace external api
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Feb 29, 2024
1 parent ac01e2b commit 22f45eb
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.mockserver.client.MockServerClient;
import org.mockserver.matchers.Times;
import org.mockserver.model.JsonBody;
import org.mockserver.model.MediaType;
import org.tkit.onecx.product.store.bff.rs.controllers.ProductsRestController;
Expand Down Expand Up @@ -127,8 +128,7 @@ void getProductByName_test() {
// create mock rest endpoint
mockServerClient
.when(request().withPath("/v1/workspaces/search")
.withMethod(HttpMethod.POST))
.withPriority(10)
.withMethod(HttpMethod.POST), Times.exactly(1))
.respond(httpRequest -> response().withStatusCode(Response.Status.OK.getStatusCode())
.withContentType(MediaType.APPLICATION_JSON)
.withBody(JsonBody.json(result)));
Expand Down Expand Up @@ -186,8 +186,7 @@ void getProductByName_test() {
// create mock rest endpoint
mockServerClient
.when(request().withPath("/v1/workspaces/search")
.withMethod(HttpMethod.POST))
.withPriority(11)
.withMethod(HttpMethod.POST), Times.exactly(1))
.respond(httpRequest -> response().withStatusCode(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()));

// create mock rest endpoint
Expand Down

0 comments on commit 22f45eb

Please sign in to comment.