...
1{
2 "description": "updateOne-validation",
3 "schemaVersion": "1.0",
4 "createEntities": [
5 {
6 "client": {
7 "id": "client0",
8 "observeEvents": [
9 "commandStartedEvent"
10 ]
11 }
12 },
13 {
14 "database": {
15 "id": "database0",
16 "client": "client0",
17 "databaseName": "crud-tests"
18 }
19 },
20 {
21 "collection": {
22 "id": "collection0",
23 "database": "database0",
24 "collectionName": "coll0"
25 }
26 }
27 ],
28 "initialData": [
29 {
30 "collectionName": "coll0",
31 "databaseName": "crud-tests",
32 "documents": [
33 {
34 "_id": 1,
35 "x": 11
36 }
37 ]
38 }
39 ],
40 "tests": [
41 {
42 "description": "UpdateOne requires atomic modifiers",
43 "operations": [
44 {
45 "name": "updateOne",
46 "object": "collection0",
47 "arguments": {
48 "filter": {
49 "_id": 1
50 },
51 "update": {
52 "x": 22
53 }
54 },
55 "expectError": {
56 "isClientError": true
57 }
58 }
59 ],
60 "expectEvents": [
61 {
62 "client": "client0",
63 "events": []
64 }
65 ],
66 "outcome": [
67 {
68 "collectionName": "coll0",
69 "databaseName": "crud-tests",
70 "documents": [
71 {
72 "_id": 1,
73 "x": 11
74 }
75 ]
76 }
77 ]
78 }
79 ]
80}
View as plain text