Skip to content

Commit 3f78483

Browse files
RUBY-2859 Fix comment helper specification tests
1 parent 823bb97 commit 3f78483

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

spec/spec_tests/data/crud_unified/bulkWrite-comment.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ tests:
4848
- updateOne:
4949
filter: &updateOne_filter
5050
_id: 2
51-
update: &update { x: "updated" }
51+
update: &update { $set: {x: "updated"} }
5252
- deleteOne:
5353
filter: &deleteOne_filter
5454
_id: 3
5555
comment: &string_comment "comment"
5656
expectResult: &expect_results
5757
deletedCount: 1
5858
insertedCount: 1
59-
insertedIds: { 0: 5 }
59+
insertedIds: { $$unsetOrMatches: { 0: 5} }
6060
matchedCount: 2
6161
modifiedCount: 2
6262
upsertedCount: 0
@@ -77,12 +77,6 @@ tests:
7777
updates:
7878
- q: *replaceOne_filter
7979
u: *replacement
80-
ordered: true
81-
comment: *string_comment
82-
- commandStartedEvent:
83-
command:
84-
update: *collection_name
85-
updates:
8680
- q: *updateOne_filter
8781
u: *update
8882
ordered: true
@@ -92,6 +86,7 @@ tests:
9286
delete: *collection_name
9387
deletes:
9488
- q: *deleteOne_filter
89+
limit: 1
9590
ordered: true
9691
comment: *string_comment
9792
outcome: &outcome
@@ -133,12 +128,6 @@ tests:
133128
updates:
134129
- q: *replaceOne_filter
135130
u: *replacement
136-
ordered: true
137-
comment: *document_comment
138-
- commandStartedEvent:
139-
command:
140-
update: *collection_name
141-
updates:
142131
- q: *updateOne_filter
143132
u: *update
144133
ordered: true
@@ -148,6 +137,7 @@ tests:
148137
delete: *collection_name
149138
deletes:
150139
- q: *deleteOne_filter
140+
limit: 1
151141
ordered: true
152142
comment: *document_comment
153143
outcome: *outcome

spec/spec_tests/data/crud_unified/updateMany-comment.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ tests:
2929
object: *collection0
3030
arguments:
3131
filter: &filter { _id: 1 }
32-
update: &update
33-
- $set: { x: 22 }
32+
update: &update { $set: {x: 22} }
3433
comment: "comment"
3534
expectEvents:
3635
- client: *client0
@@ -42,6 +41,7 @@ tests:
4241
-
4342
q: *filter
4443
u: *update
44+
multi: true
4545
comment: "comment"
4646
outcome: &outcome
4747
- collectionName: *collection0Name
@@ -69,6 +69,7 @@ tests:
6969
-
7070
q: *filter
7171
u: *update
72+
multi: true
7273
comment: *comment
7374
outcome: *outcome
7475

@@ -94,5 +95,6 @@ tests:
9495
-
9596
q: *filter
9697
u: *update
98+
multi: true
9799
comment: "comment"
98100
outcome: *initialData

spec/spec_tests/data/crud_unified/updateOne-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ tests:
2929
object: *collection0
3030
arguments:
3131
filter: &filter { _id: 1 }
32-
update: &update { x: 22 }
32+
update: &update { $set: {x: 22} }
3333
comment: "comment"
3434
expectEvents:
3535
- client: *client0

0 commit comments

Comments
 (0)