   'content-type': 'text/html; charset=utf-8',
   'content-length': '12' })
 
-nock("http://localhost:5984").get("/cloudq2/foo").reply 200, "{\"klass\":\"foo\",\"args\":[\"bar\",\"baz\"],\"id\":\"9166ef4c39ef55e154f22990ba050140\"}",
+nock("http://localhost:5984").get("/cloudq/foo").reply 200, "{\"klass\":\"foo\",\"args\":[\"bar\",\"baz\"],\"id\":\"9166ef4c39ef55e154f22990ba050140\"}",
   "content-type": "application/json"
   connection: "keep-alive"
   "transfer-encoding": "chunked"

  'content-length': '12'

describe 'happy path', ->
  server = 'http://localhost:3000/cloudq2'
  queue = server + '/foo'
  id = ""


assert = require 'assert'
nock = require('nock')

nock("http://localhost:5984").get("/cloudq").reply 200, "{\"db_name\":\"cloudq2\",\"doc_count\":5,\"doc_del_count\":0,\"update_seq\":45,\"purge_seq\":0,\"compact_running\":false,\"disk_size\":53337,\"instance_start_time\":\"1340072087126105\",\"disk_format_version\":5,\"committed_update_seq\":45}\n",
  server: "CouchDB/1.1.0 (Erlang OTP/R14B01)"
  date: "Tue, 19 Jun 2012 02:25:09 GMT"
  "content-type": "application/json"
  "content-length": "217"
  "cache-control": "must-revalidate"

nock("http://localhost:5984").get("/cloudq/_design/complete").reply 200
nock("http://localhost:5984").get("/cloudq/_design/completed").reply 200
nock("http://localhost:5984").get("/cloudq/_design/dequeue").reply 200
nock("http://localhost:5984").get("/cloudq/_design/queued").reply 200
nock("http://localhost:5984").get("/cloudq/_design/queues").reply 200

nock("http://localhost:5984").filteringRequestBody( -> '*').put("/cloudq/_design/complete", "*").reply 200
nock("http://localhost:5984").filteringRequestBody( -> '*').put("/cloudq/_design/completed", "*").reply 200
nock("http://localhost:5984").filteringRequestBody( -> '*').put("/cloudq/_design/dequeue", "*").reply 200
nock("http://localhost:5984").filteringRequestBody( -> '*').put("/cloudq/_design/queued", "*").reply 200
nock("http://localhost:5984").filteringRequestBody( -> '*').put("/cloudq/_design/queues", "*").reply 200

nock("http://localhost:5984").get("/cloudq/foo").reply 200, "{\"status\":\"empty\"}",
  "content-type": "application/json"
  connection: "keep-alive"
  "transfer-encoding": "chunked"
