summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMathias <mathias@spray.cc>2011-09-27 21:43:45 +0200
committerMathias <mathias@spray.cc>2011-09-27 21:43:45 +0200
commit48b6d35942963b412810b3cc61d3c3ca7f79f513 (patch)
tree238938cf8c6bdcbf170a8f2ba33843dfc50d5915 /src/test
parent408567fd7508166a0fa323bd6cd435f81259a635 (diff)
downloadspray-json-48b6d35942963b412810b3cc61d3c3ca7f79f513.tar.gz
spray-json-48b6d35942963b412810b3cc61d3c3ca7f79f513.tar.bz2
spray-json-48b6d35942963b412810b3cc61d3c3ca7f79f513.zip
Add test case for jsonFormat order agnosticity
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/cc/spray/json/ProductFormatsSpec.scala3
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"))
)