From 61a9cc6e6a6112e2cf2f68fb9ffde69cc7f98b0d Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Mon, 3 Dec 2012 13:52:25 -0800 Subject: [PATCH] fixed formats --- src/test/scala/ModelSerializersTest.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/scala/ModelSerializersTest.scala b/src/test/scala/ModelSerializersTest.scala index b0fc3e0c9f..b9e9c7663e 100644 --- a/src/test/scala/ModelSerializersTest.scala +++ b/src/test/scala/ModelSerializersTest.scala @@ -39,7 +39,7 @@ class ModelRefSerializationTest extends FlatSpec with ShouldMatchers { @RunWith(classOf[JUnitRunner]) class ModelPropertySerializationTest extends FlatSpec with ShouldMatchers { - implicit val formats = DefaultFormats + new AllowableValuesSerializer + new ModelPropertySerializer + implicit val formats = DefaultFormats + new AllowableValuesSerializer + new ModelPropertySerializer + new ModelRefSerializer it should "deserialize a model property with allowable values and ref" in { val jsonString = """ @@ -68,7 +68,7 @@ class ModelPropertySerializationTest extends FlatSpec with ShouldMatchers { case _ => fail("expected allowable values") } p.items match { - case e: ModelRef => { + case Some(e: ModelRef) => { e.ref should be ("Foo") e.`type` should be ("Bar") }