Commit 6b307488 authored by Illya Klymov's avatar Illya Klymov Committed by Peter Hegman

Fix incorrect new group path in import history

* always append / for root

Changelog: fixed
parent 18cbbc26
......@@ -111,7 +111,7 @@ export default {
},
getFullDestinationUrl(params) {
return joinPaths(gon.relative_url_root || '', this.getDestinationUrl(params));
return joinPaths(gon.relative_url_root || '', '/', this.getDestinationUrl(params));
},
},
......
......@@ -137,6 +137,16 @@ describe('BulkImportsHistoryApp', () => {
);
});
it('renders correct url for destination group when relative_url is empty', async () => {
mock.onGet(API_URL).reply(200, DUMMY_RESPONSE, DEFAULT_HEADERS);
createComponent({ shallow: false });
await axios.waitForAll();
expect(wrapper.find('tbody tr a').attributes().href).toBe(
`/${DUMMY_RESPONSE[0].destination_namespace}/${DUMMY_RESPONSE[0].destination_name}`,
);
});
describe('details button', () => {
beforeEach(() => {
mock.onGet(API_URL).reply(200, DUMMY_RESPONSE, DEFAULT_HEADERS);
......
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