diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/scala/cc/spray/json/ProductFormatsSpec.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/scala/cc/spray/json/ProductFormatsSpec.scala b/src/test/scala/cc/spray/json/ProductFormatsSpec.scala index edd2481..763b4b0 100644 --- a/src/test/scala/cc/spray/json/ProductFormatsSpec.scala +++ b/src/test/scala/cc/spray/json/ProductFormatsSpec.scala @@ -26,6 +26,9 @@ class ProductFormatsSpec extends Specification with DefaultJsonProtocol { "ignore additional members during deserialization" in { JsObject(JsField("a", 42), JsField("b", 4.2), JsField("c", 'no)).fromJson[Test2] mustEqual obj } + "not depend on any specific member order for deserialization" in { + JsObject(JsField("b", 4.2), JsField("a", 42)).fromJson[Test2] mustEqual obj + } "throw a DeserializationException if the JsValue is not a JsObject" in ( JsNull.fromJson[Test2] must throwA(new DeserializationException("Object expected")) ) |