Skip to content

Commit

Permalink
Fix Post product test
Browse files Browse the repository at this point in the history
  • Loading branch information
SerVB committed Mar 22, 2020
1 parent 938d357 commit 7800c11
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import io.kotest.core.spec.style.BehaviorSpec
import io.kotest.matchers.maps.shouldContainExactly
import io.kotest.matchers.shouldBe
import io.ktor.application.Application
import io.ktor.http.ContentType
import io.ktor.http.HttpHeaders
import io.ktor.http.HttpMethod
import io.ktor.http.HttpStatusCode
import io.ktor.server.testing.handleRequest
Expand All @@ -18,6 +20,7 @@ class EShopProductCreateProductTest : BehaviorSpec({
`when`("I call POST /v1/product") {
val call = handleRequest(HttpMethod.Post, "/v1/product") {
this.setBody("""{"name": "abc", "id": 123, "type": 1234}""")
this.addHeader(HttpHeaders.ContentType, ContentType.Application.Json.toString())
}

then("the response status should be OK") {
Expand Down

0 comments on commit 7800c11

Please sign in to comment.