Permalink
Browse files

[test] adds copy fixture

  • Loading branch information...
dscape committed Jul 7, 2012
1 parent e91a938 commit a769a8c183298188fea8a3a0627fad7974a746f4
Showing with 43 additions and 0 deletions.
  1. +43 −0 tests/fixtures/doc/copy.json
@@ -0,0 +1,43 @@
+[
+ { "method" : "put"
+ , "path" : "/doc_copy"
+ , "status" : 201
+ , "response" : "{ \"ok\": true }"
+ }
+, { "method" : "put"
+ , "status" : 201
+ , "path" : "/doc_copy/foo_src"
+ , "body" : "{\"foo\":\"baz\"}"
+ , "response" : "{\"ok\":true,\"id\":\"foo_src\",\"rev\":\"1-611488\"}"
+ }
+, { "method" : "put"
+ , "status" : 201
+ , "path" : "/doc_copy/foo_dest"
+ , "body" : "{\"baz\":\"foo\"}"
+ , "response" : "{\"ok\":true,\"id\":\"foo_dest\",\"rev\":\"1-351431\"}"
+ }
+, { "method" : "head"
+ , "status" : 200
+ , "path" : "/doc_copy/foo_dest"
+ , "headers" : {"etag": "\"1-aa43f0\""}
+ }
+, { "method" : "copy"
+ , "path" : "/doc_copy/foo_src"
+ , "response" : "{ \"id\": \"foo_dest\", \"rev\": \"2-e66edd\" }"
+ , "status" : 201
+ }
+, { "method" : "copy"
+ , "path" : "/doc_copy/foo_src"
+ , "response" : "{ \"error\": \"conflict\", \"reason\": \"Document update conflict.\" }"
+ , "status" : 409
+ }
+, { "method" : "copy"
+ , "path" : "/doc_copy/foo_src"
+ , "response" : "{ \"id\": \"baz_dest\", \"rev\": \"1-36645f\" }"
+ , "status" : 201
+ }
+, { "method" : "delete"
+ , "path" : "/doc_copy"
+ , "response" : "{ \"ok\": true }"
+ }
+]

0 comments on commit a769a8c

Please sign in to comment.