couchbaselabs / cblite-tests

tests for mobile servers, clients, and sync interop
5 stars 0 forks source link

Is there a test for running a query for a specific key? #17

Closed tleyden closed 10 years ago

tleyden commented 10 years ago

Original issue report: http://www.couchbase.com/communities/q-and-a/get-documents-single-key-android-couchbase-lite

Which tests in cblite-tests (if any) test the following functionality?

http://guide.couchdb.org/draft/views.html#one

If there are none, can you add one?

andreibaranouski commented 10 years ago

we have such tests https://github.com/couchbaselabs/cblite-tests/blob/master/tests/cbl-views.js#L86-L96

they have the same result for both Android and ios:

{ offset: 0, total_rows: 1, rows: [ { id: 'cbl_views_5', value: 'bar', key: 'cbl_views_5' } ] } { offset: 0, total_rows: 3, rows: [ { id: 'cbl_views_3', value: 'bar', key: 'cbl_views_3' }, { id: 'cbl_views_4', value: 'bar', key: 'cbl_views_4' }, { id: 'cbl_views_5', value: 'bar', key: 'cbl_views_5' } ] }