Commit c6b525bb authored by mo khan's avatar mo khan

Use the raw endpoint url

parent 0b817a6f
...@@ -9,5 +9,4 @@ export const isJobFailed = state => ...@@ -9,5 +9,4 @@ export const isJobFailed = state =>
[REPORT_STATUS.jobFailed, REPORT_STATUS.noDependencies].includes(state.reportInfo.status); [REPORT_STATUS.jobFailed, REPORT_STATUS.noDependencies].includes(state.reportInfo.status);
export const isIncomplete = state => state.reportInfo.status === REPORT_STATUS.incomplete; export const isIncomplete = state => state.reportInfo.status === REPORT_STATUS.incomplete;
export const downloadEndpoint = ({ endpoint }) => export const downloadEndpoint = ({ endpoint }) => endpoint;
endpoint.endsWith('.json') ? endpoint : `${endpoint}.json`;
...@@ -31,7 +31,7 @@ describe('DependenciesActions component', () => { ...@@ -31,7 +31,7 @@ describe('DependenciesActions component', () => {
factory({ factory({
propsData: { namespace }, propsData: { namespace },
}); });
store.state[namespace].endpoint = `${TEST_HOST}/dependencies`; store.state[namespace].endpoint = `${TEST_HOST}/dependencies.json`;
return wrapper.vm.$nextTick(); return wrapper.vm.$nextTick();
}); });
......
...@@ -28,7 +28,7 @@ describe('Dependencies getters', () => { ...@@ -28,7 +28,7 @@ describe('Dependencies getters', () => {
describe('downloadEndpoint', () => { describe('downloadEndpoint', () => {
it('should return download endpoint', () => { it('should return download endpoint', () => {
const endpoint = `${TEST_HOST}/dependencies`; const endpoint = `${TEST_HOST}/dependencies`;
expect(getters.downloadEndpoint({ endpoint })).toBe(`${TEST_HOST}/dependencies.json`); expect(getters.downloadEndpoint({ endpoint })).toBe(endpoint);
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment