Skip to content

Commit 37255a1

Browse files
committed
RUBY-1089 Add a few missing matched count tests
1 parent 60884cd commit 37255a1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/mongo/bulk_write_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,10 @@
523523
expect(result.upserted_count).to eq(1)
524524
end
525525

526+
it 'reports the matched count' do
527+
expect(result.modified_count).to eq(0)
528+
end
529+
526530
it 'reports the modified count' do
527531
expect(result.modified_count).to eq(0)
528532
end
@@ -786,6 +790,10 @@
786790
expect(result.modified_count).to eq(2)
787791
end
788792

793+
it 'reports the matched count' do
794+
expect(result.modified_count).to eq(2)
795+
end
796+
789797
context 'when there is a write concern error' do
790798

791799
context 'when the server version is < 2.6' do
@@ -827,6 +835,10 @@
827835
expect(result.upserted_count).to eq(1)
828836
end
829837

838+
it 'reports the matched count' do
839+
expect(result.matched_count).to eq(0)
840+
end
841+
830842
it 'reports the modified count' do
831843
expect(result.modified_count).to eq(0)
832844
end

0 commit comments

Comments
 (0)