diff options
author | Mathias <mathias@spray.io> | 2012-12-19 14:00:08 +0100 |
---|---|---|
committer | Mathias <mathias@spray.io> | 2012-12-19 14:00:08 +0100 |
commit | 76c8a574718d53156b76b67bfea3de8942e948f5 (patch) | |
tree | 8edef6bbc8910f94e41be784cb71d1eedffd2d63 /src/test/scala/spray | |
parent | 303713ea4ce2784e89c463a2716f36768f0728bf (diff) | |
download | spray-json-76c8a574718d53156b76b67bfea3de8942e948f5.tar.gz spray-json-76c8a574718d53156b76b67bfea3de8942e948f5.tar.bz2 spray-json-76c8a574718d53156b76b67bfea3de8942e948f5.zip |
Upgrade to Scala 2.10.0-RC5
Diffstat (limited to 'src/test/scala/spray')
-rw-r--r-- | src/test/scala/spray/json/ProductFormatsSpec.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/scala/spray/json/ProductFormatsSpec.scala b/src/test/scala/spray/json/ProductFormatsSpec.scala index e452639..ec9d65f 100644 --- a/src/test/scala/spray/json/ProductFormatsSpec.scala +++ b/src/test/scala/spray/json/ProductFormatsSpec.scala @@ -84,4 +84,15 @@ class ProductFormatsSpec extends Specification { } } + "A JsonFormat for a generic case class with an explicitly provided type parameter" should { + "support the jsonFormat1 syntax" in { + case class Box[A](a: A) + object BoxProtocol extends DefaultJsonProtocol { + implicit val boxFormat = jsonFormat1(Box[Int]) + } + import BoxProtocol._ + Box(42).toJson === JsObject(Map("a" -> JsNumber(42))) + } + } + } |