PutDocInCollection will upsert the document with a given contents in the given collection.
(collection, docID, body string)
| 150 | |
| 151 | // PutDocInCollection will upsert the document with a given contents in the given collection. |
| 152 | func (rt *RestTester) PutDocInCollection(collection, docID, body string) DocVersion { |
| 153 | rawResponse := rt.SendAdminRequest(http.MethodPut, fmt.Sprintf("/%s.%s/%s", rt.GetDatabase().Name, collection, docID), body) |
| 154 | RequireStatus(rt.TB(), rawResponse, 201) |
| 155 | return DocVersionFromPutResponse(rt.TB(), rawResponse) |
| 156 | } |
| 157 | |
| 158 | // UpdateDocRev updates a document at a specific revision and returns the new version. Deprecated for UpdateDoc. |
| 159 | func (rt *RestTester) UpdateDocRev(docID, revID, body string) string { |