Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/adapter-tests/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ export default (test: AdapterMethodsTest, app: any, _errors: any, serviceName: s

test('.patch multi query same', async () => {
const service = app.service(serviceName);
const multiBefore = service.options.multi;

service.options.multi = true;

const params = {
query: { age: { $lt: 10 } }
};
Expand All @@ -480,10 +484,16 @@ export default (test: AdapterMethodsTest, app: any, _errors: any, serviceName: s

await service.remove(dave[idProp]);
await service.remove(david[idProp]);

service.options.multi = multiBefore;
});

test('.patch multi query changed', async () => {
const service = app.service(serviceName);
const multiBefore = service.options.multi;

service.options.multi = true;

const params = {
query: { age: 10 }
};
Expand All @@ -508,6 +518,8 @@ export default (test: AdapterMethodsTest, app: any, _errors: any, serviceName: s

await service.remove(dave[idProp]);
await service.remove(david[idProp]);

service.options.multi = multiBefore;
});

test('.patch + NotFound', async () => {
Expand Down