changed path in tests to match default value for websvc.opensearch.svccontext

This commit is contained in:
nwoodward
2022-10-27 17:07:14 -05:00
parent 434e0cb907
commit 2235072bea

View File

@@ -96,17 +96,17 @@ describe('RssComponent', () => {
}); });
it('should formulate the correct url given params in url', () => { it('should formulate the correct url given params in url', () => {
const route = comp.formulateRoute(uuid, 'opensearch', options, query); const route = comp.formulateRoute(uuid, 'opensearch/search', options, query);
expect(route).toBe('/opensearch/search?format=atom&scope=2cfcf65e-0a51-4bcb-8592-b8db7b064790&sort=dc.title&sort_direction=DESC&query=test'); expect(route).toBe('/opensearch/search?format=atom&scope=2cfcf65e-0a51-4bcb-8592-b8db7b064790&sort=dc.title&sort_direction=DESC&query=test');
}); });
it('should skip uuid if its null', () => { it('should skip uuid if its null', () => {
const route = comp.formulateRoute(null, 'opensearch', options, query); const route = comp.formulateRoute(null, 'opensearch/search', options, query);
expect(route).toBe('/opensearch/search?format=atom&sort=dc.title&sort_direction=DESC&query=test'); expect(route).toBe('/opensearch/search?format=atom&sort=dc.title&sort_direction=DESC&query=test');
}); });
it('should default to query * if none provided', () => { it('should default to query * if none provided', () => {
const route = comp.formulateRoute(null, 'opensearch', options, null); const route = comp.formulateRoute(null, 'opensearch/search', options, null);
expect(route).toBe('/opensearch/search?format=atom&sort=dc.title&sort_direction=DESC&query=*'); expect(route).toBe('/opensearch/search?format=atom&sort=dc.title&sort_direction=DESC&query=*');
}); });
}); });