Skip to content

Commit

Permalink
tests: fix loading an empty file for ParselyAPIConnectionTest
Browse files Browse the repository at this point in the history
  • Loading branch information
wzieba committed Nov 13, 2023
1 parent 39f8831 commit dbc73e1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class ParselyAPIConnectionTest {
runTest {
// given
mockServer.enqueue(MockResponse().setResponseCode(400))
val sampleEvents = mapOf("idsite" to "example.com")

// when
val result = sut.send(pixelPayload)
Expand All @@ -68,6 +67,8 @@ class ParselyAPIConnectionTest {

companion object {
val pixelPayload: String =
this::class.java.getResource("pixel_payload.json")?.readText().orEmpty()
ClassLoader.getSystemResource("pixel_payload.json").readText().apply {
assert(isNotBlank())
}
}
}

0 comments on commit dbc73e1

Please sign in to comment.