--- a/src/main/scala/Main.scala Mon Aug 29 00:09:17 2011 -0400
+++ b/src/main/scala/Main.scala Mon Aug 29 00:17:02 2011 -0400
@@ -79,8 +79,8 @@
}
}
}
-
}
+ case _ => MethodNotAllowed ~> Allow("GET", "PUT", "POST")
}
}
}
--- a/src/test/scala/Test.scala Mon Aug 29 00:09:17 2011 -0400
+++ b/src/test/scala/Test.scala Mon Aug 29 00:17:02 2011 -0400
@@ -177,5 +177,11 @@
statusCode must_== 400
}
}
-
+
+ """a DELETE request""" should {
+ "not be supported yet" in {
+ val statusCode = Http.when(_ == 405)(joe.copy(method="DELETE") get_statusCode)
+ statusCode must_== 405
+ }
+ }
}