File: find.yml

package info (click to toggle)
ruby-mongo 2.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,020 kB
  • sloc: ruby: 110,810; makefile: 5
file content (49 lines) | stat: -rw-r--r-- 1,112 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
data:
    - {_id: 1, x: 11}
    - {_id: 2, x: 22}
    - {_id: 3, x: 33}
    - {_id: 4, x: 44}
    - {_id: 5, x: 55}

tests:
    -
        description: "Find with filter"
        operation:
            name: "find"
            arguments:
                filter: {_id: 1}

        outcome:
            result:
                - {_id: 1, x: 11}

    - 
        description: "Find with filter, sort, skip, and limit"
        operation: 
            name: "find"
            arguments:
                filter: 
                    _id: {$gt: 2}
                sort: {_id: 1}
                skip: 2
                limit: 2

        outcome:
            result:
                - {_id: 5, x: 55}
    -
        description: "Find with limit, sort, and batchsize"
        operation: 
            name: "find"
            arguments:
                filter: {}
                sort: {_id: 1}
                limit: 4
                batchSize: 2

        outcome:
            result:
                - {_id: 1, x: 11}
                - {_id: 2, x: 22}
                - {_id: 3, x: 33}
                - {_id: 4, x: 44}