Skip to content

Commit 042f9a0

Browse files
committed
Fix upickle tests
1 parent e0c83f5 commit 042f9a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

json/upickle/src/test/scala/sttp/client4/upicklejson/UpickleTests.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ class UpickleTests extends AnyFlatSpec with Matchers with EitherValues {
3434
RunResponseAs(responseAs)(body).right.value shouldBe expected
3535
}
3636

37-
it should "decode None from empty array body" in {
37+
it should "decode None from empty body" in {
3838
import UsingDefaultReaderWriters._
3939
import sttp.client4.upicklejson.default._
4040

4141
val responseAs = asJson[Option[Inner]]
4242

43-
RunResponseAs(responseAs)("[]").right.value shouldBe None
43+
RunResponseAs(responseAs)("").right.value shouldBe None
4444
}
4545

4646
it should "decode Left(None) from upickle notation" in {
@@ -49,7 +49,7 @@ class UpickleTests extends AnyFlatSpec with Matchers with EitherValues {
4949

5050
val responseAs = asJson[Either[Option[Inner], Outer]]
5151

52-
RunResponseAs(responseAs)("[0,[]]").right.value shouldBe Left(None)
52+
RunResponseAs(responseAs)("[0,null]").right.value shouldBe Left(None)
5353
}
5454

5555
it should "decode Right(None) from upickle notation" in {
@@ -58,7 +58,7 @@ class UpickleTests extends AnyFlatSpec with Matchers with EitherValues {
5858

5959
val responseAs = asJson[Either[Outer, Option[Inner]]]
6060

61-
RunResponseAs(responseAs)("[1,[]]").right.value shouldBe Right(None)
61+
RunResponseAs(responseAs)("[1,null]").right.value shouldBe Right(None)
6262
}
6363

6464
it should "fail to decode from empty input" in {

0 commit comments

Comments
 (0)