--- 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
}
}