@@ -197,12 +197,19 @@ func TestNoCollectionsPutDocWithKeyspace(t *testing.T) {
197
197
response = rt .SendAdminRequest (http .MethodPut , "/db._default._default/doc1" , docBody )
198
198
RequireStatus (t , response , http .StatusCreated )
199
199
200
- // retrieve doc in both ways (_default._default and no fully-qualified keyspace)
201
- body := rt .GetDocBodyFromKeyspace ("db._default._default" , "doc1" )
202
- assert .Equal (t , "bar" , body ["foo" ])
203
-
204
- body = rt .GetDocBodyFromKeyspace ("db" , "doc1" )
205
- assert .Equal (t , "bar" , body ["foo" ])
200
+ version , _ := rt .GetDoc ("doc1" )
201
+
202
+ // retrieve doc in both ways (explicit and implicit _default scope/collection)
203
+ for _ , keyspace := range []string {
204
+ "db._default._default" , // fully qualified
205
+ "db" , // implicit
206
+ } {
207
+ body := rt .GetDocBodyFromKeyspace (keyspace , "doc1" )
208
+ assert .Equal (t , "bar" , body ["foo" ])
209
+ assert .Equal (t , "doc1" , body ["_id" ])
210
+ assert .Equal (t , version .RevTreeID , body ["_rev" ])
211
+ assert .Equal (t , version .CV .String (), body ["_cv" ])
212
+ }
206
213
}
207
214
208
215
func TestSingleCollectionDCP (t * testing.T ) {
0 commit comments