Skip to content

Commit

Permalink
remove testing updateMany with 'overwrite' option true, since it does…
Browse files Browse the repository at this point in the history
…nt exist
  • Loading branch information
RsknCankov committed Jul 11, 2020
1 parent d3c489a commit 8e061c5
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions test/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,20 +663,6 @@ describe('MongoTenant', function() {
});
});

it('should preserve tenant context on Model.updateMany() with truthy overwrite option.', function(done) {
let TestModel = utils.createTestModel({someField: String});

TestModel.create({tenantId: 'tenant1'}, {tenantId: 'tenant2'}, (err) => {
assert(!err, 'Expected creation of 2 test entities to work.');

TestModel.byTenant('tenant1').updateMany({}, {tenantId: 'tenant2', someField: 'some-value'}, {overwrite: true}, (err) => {
assert(err, 'Expected model updateMany to be disabled by MongoDB server.');

done();
});
});
});

it('should not affect Model.updateMany() when not in tenant context.', function(done) {
let TestModel = utils.createTestModel({someField: String});

Expand Down

0 comments on commit 8e061c5

Please sign in to comment.