Skip to content

Commit

Permalink
Fix test to use JsValue not String for payload
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieB-gu committed Dec 3, 2024
1 parent dcd3e5c commit aa37687
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/test/renderers/DotcomRenderingServiceTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.scalatest.{BeforeAndAfterAll, DoNotDiscover, PrivateMethodTester}
import org.scalatest.matchers.should.Matchers
import test.{ConfiguredTestSuite, TestRequest, WithMaterializer, WithTestWsClient}
import play.api.libs.ws.{WSClient, WSRequest, WSResponse}
import play.api.libs.json.{JsString}
import play.api.mvc.{Result}
import conf.Configuration
import org.mockito.Matchers.any
Expand Down Expand Up @@ -35,7 +36,7 @@ import org.scalatest.flatspec.AnyFlatSpec
private val wsRequestMock = mock[WSRequest]

"post" should "return a 404 for DCR 415 errors" in {
val payload = "payload"
val payload = JsString("payload")
when(wsMock.url(any[String])).thenReturn(wsRequestMock)
when(wsRequestMock.withRequestTimeout(any())).thenReturn(wsRequestMock)
when(wsRequestMock.addHttpHeaders(any())).thenReturn(wsRequestMock)
Expand Down

0 comments on commit aa37687

Please sign in to comment.