|
618 | 618 | end
|
619 | 619 |
|
620 | 620 | it 'deletes the first matching document in the collection' do
|
621 |
| - expect(response.written_count).to eq(1) |
| 621 | + expect(response.deleted_count).to eq(1) |
622 | 622 | end
|
623 | 623 | end
|
624 | 624 |
|
|
633 | 633 | end
|
634 | 634 |
|
635 | 635 | it 'deletes the first document in the collection' do
|
636 |
| - expect(response.written_count).to eq(1) |
| 636 | + expect(response.deleted_count).to eq(1) |
637 | 637 | end
|
638 | 638 | end
|
639 | 639 | end
|
|
655 | 655 | end
|
656 | 656 |
|
657 | 657 | it 'deletes the matching documents in the collection' do
|
658 |
| - expect(authorized_collection.delete_many(selector).written_count).to eq(1) |
| 658 | + expect(authorized_collection.delete_many(selector).deleted_count).to eq(1) |
659 | 659 | end
|
660 | 660 | end
|
661 | 661 |
|
662 | 662 | context 'when no selector was provided' do
|
663 | 663 |
|
664 | 664 | it 'deletes all the documents in the collection' do
|
665 |
| - expect(authorized_collection.delete_many.written_count).to eq(2) |
| 665 | + expect(authorized_collection.delete_many.deleted_count).to eq(2) |
666 | 666 | end
|
667 | 667 | end
|
668 | 668 | end
|
|
692 | 692 | end
|
693 | 693 |
|
694 | 694 | it 'updates the first matching document in the collection' do
|
695 |
| - expect(response.written_count).to eq(1) |
| 695 | + expect(response.modified_count).to eq(1) |
696 | 696 | end
|
697 | 697 |
|
698 | 698 | it 'updates the documents in the collection' do
|
|
711 | 711 | end
|
712 | 712 |
|
713 | 713 | it 'reports that no documents were written' do
|
714 |
| - expect(response.written_count).to eq(0) |
| 714 | + expect(response.modified_count).to eq(0) |
715 | 715 | end
|
716 | 716 |
|
717 | 717 | it 'does not insert the document' do
|
|
753 | 753 | end
|
754 | 754 |
|
755 | 755 | it 'reports that no documents were written' do
|
756 |
| - expect(response.written_count).to eq(0) |
| 756 | + expect(response.modified_count).to eq(0) |
757 | 757 | end
|
758 | 758 |
|
759 | 759 | it 'does not insert the document' do
|
|
787 | 787 | end
|
788 | 788 |
|
789 | 789 | it 'returns the number updated' do
|
790 |
| - expect(response.written_count).to eq(2) |
| 790 | + expect(response.modified_count).to eq(2) |
791 | 791 | end
|
792 | 792 |
|
793 | 793 | it 'updates the documents in the collection' do
|
|
807 | 807 | end
|
808 | 808 |
|
809 | 809 | it 'reports that no documents were updated' do
|
810 |
| - expect(response.written_count).to eq(0) |
| 810 | + expect(response.modified_count).to eq(0) |
811 | 811 | end
|
812 | 812 |
|
813 | 813 | it 'updates no documents in the collection' do
|
|
846 | 846 | end
|
847 | 847 |
|
848 | 848 | it 'reports that no documents were updated' do
|
849 |
| - expect(response.written_count).to eq(0) |
| 849 | + expect(response.modified_count).to eq(0) |
850 | 850 | end
|
851 | 851 |
|
852 | 852 | it 'updates no documents in the collection' do
|
|
876 | 876 | end
|
877 | 877 |
|
878 | 878 | it 'updates the first matching document in the collection' do
|
879 |
| - expect(response.written_count).to eq(1) |
| 879 | + expect(response.modified_count).to eq(1) |
880 | 880 | end
|
881 | 881 |
|
882 | 882 | it 'updates the documents in the collection' do
|
|
896 | 896 | end
|
897 | 897 |
|
898 | 898 | it 'reports that no documents were updated' do
|
899 |
| - expect(response.written_count).to eq(0) |
| 899 | + expect(response.modified_count).to eq(0) |
900 | 900 | end
|
901 | 901 |
|
902 | 902 | it 'updates no documents in the collection' do
|
|
935 | 935 | end
|
936 | 936 |
|
937 | 937 | it 'reports that no documents were updated' do
|
938 |
| - expect(response.written_count).to eq(0) |
| 938 | + expect(response.modified_count).to eq(0) |
939 | 939 | end
|
940 | 940 |
|
941 | 941 | it 'updates no documents in the collection' do
|
|
0 commit comments