~ factorize the RequestLogger
authorAlexandre Bertails <bertails@w3.org>
Wed, 24 Aug 2011 14:33:51 -0400
changeset 63 6ff1023ed3dd
parent 62 7cf163bf2865
child 64 764b4cf0f325
~ factorize the RequestLogger
src/test/scala/RecordAPISpec.scala
--- a/src/test/scala/RecordAPISpec.scala	Wed Aug 24 14:27:37 2011 -0400
+++ b/src/test/scala/RecordAPISpec.scala	Wed Aug 24 14:33:51 2011 -0400
@@ -39,13 +39,15 @@
     
   "POST record" should {
     val POSTrun = host / "user" / "jdoe" / "run"
-    "return a location header that has same domain and port than the POST url" in {
+    "return a location telling where the record is GETtable" in {
       val locationHeader:String = Http((POSTrun <<< record).copy(method="POST") >:> { headers =>
         headers get "Location" getOrElse sys.error("no Location header") head
       })
       val locationURL = new URL(locationHeader)
       locationURL.getHost must_== POSTrun.host.getHostName
       locationURL.getPort must_== POSTrun.host.getPort
+      val run = Http(url(locationHeader) as_str)
+      run must not be empty
     }
   }