+ test for DELETE (specification unknown)
authorAlexandre Bertails <bertails@gmail.com>
Mon, 29 Aug 2011 00:17:02 -0400
changeset 22 209fb5cf5c2a
parent 21 6cce50b70e79
child 23 a6e5204c0f07
+ test for DELETE (specification unknown)
src/main/scala/Main.scala
src/test/scala/Test.scala
--- 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
+    }
+  }
 }