Skip to content

Commit 1840df2

Browse files
committed
Retired redundent test
1 parent 9652d05 commit 1840df2

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

Diff for: src/plugins/persistence/couch/pluginSpec.js

-38
Original file line numberDiff line numberDiff line change
@@ -373,44 +373,6 @@ describe('the plugin', () => {
373373
expect(requestMethod).toEqual('PUT');
374374
});
375375
});
376-
describe('implements server-side search', () => {
377-
let mockPromise;
378-
beforeEach(() => {
379-
mockPromise = Promise.resolve({
380-
body: {
381-
getReader() {
382-
return {
383-
read() {
384-
return Promise.resolve({
385-
done: true,
386-
value: undefined
387-
});
388-
}
389-
};
390-
}
391-
}
392-
});
393-
fetch.and.returnValue(mockPromise);
394-
});
395-
396-
it("using Couch's 'find' endpoint", async () => {
397-
await Promise.all(openmct.objects.search('test'));
398-
const requestUrl = fetch.calls.mostRecent().args[0];
399-
400-
// we only want one call to fetch, not 2!
401-
// see https://github.com/nasa/openmct/issues/4667
402-
expect(fetch).toHaveBeenCalledTimes(1);
403-
expect(requestUrl.endsWith('_find')).toBeTrue();
404-
});
405-
406-
it('and supports search by object name', async () => {
407-
await Promise.all(openmct.objects.search('test'));
408-
const requestPayload = JSON.parse(fetch.calls.mostRecent().args[1].body);
409-
410-
expect(requestPayload).toBeDefined();
411-
expect(requestPayload.selector.model.name.$regex).toEqual('(?i)test');
412-
});
413-
});
414376
});
415377

416378
describe('the view', () => {

0 commit comments

Comments
 (0)