Commit f2a4a252 authored by Nathan Friend's avatar Nathan Friend

Add test for API URL slash prefixing behavior

This commit adds a test for a new behavior originally added in
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50038.
parent 4ddfdb03
......@@ -20,6 +20,10 @@ describe('~/api/api_utils.js', () => {
);
});
it('ensures the URL is prefixed with a /', () => {
expect(apiUtils.buildApiUrl('api/:version/projects/:id')).toEqual('/api/v7/projects/:id');
});
describe('when gon includes a relative_url_root property', () => {
beforeEach(() => {
window.gon.relative_url_root = '/relative/root';
......
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