Why are 2 HTTP calls made?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why are 2 HTTP calls made?

Gregg
This snippet makes 2 HTTP calls. Why is that?

  "Calling DELETE on /allProjects" should {
    val req = :/(url, port) / app / "allProjects" DELETE
    val response = http x (req as_str) {
      case (status, res, opt, out) => (status, res, opt, out())
    }
    "return 200" in {response._1 must_== 200}
  }

Thanks - Gregg
Reply | Threaded
Open this post in threaded view
|

Re: Why are 2 HTTP calls made?

Gregg
Answer - because I didn't understand how specs works and the entire block was called twice.

Sorry :)
Reply | Threaded
Open this post in threaded view
|

Re: Why are 2 HTTP calls made?

n8han
Administrator
On 11/29/2010 08:55 PM, Gregg [via Databinder] wrote:
> Answer - because I didn't understand how specs works and the entire
> block was called twice.
>
> Sorry :)

That's my favorite kind of question! :)

Nathan