Commit cb6a16a2 authored by Phil Hughes's avatar Phil Hughes

fixed more specs

parent 132db99a
......@@ -12,6 +12,7 @@ describe('MRWidgetHeader', () => {
afterEach(() => {
vm.$destroy();
gon.relative_url_root = '';
});
describe('computed', () => {
......@@ -145,7 +146,16 @@ describe('MRWidgetHeader', () => {
const button = vm.$el.querySelector('.js-web-ide');
expect(button.textContent.trim()).toEqual('Web IDE');
expect(button.getAttribute('href')).toEqual('undefined/-/ide/projectabc');
expect(button.getAttribute('href')).toEqual('/-/ide/projectabc');
});
it('renders web ide button with relative URL', () => {
gon.relative_url_root = '/gitlab';
const button = vm.$el.querySelector('.js-web-ide');
expect(button.textContent.trim()).toEqual('Web IDE');
expect(button.getAttribute('href')).toEqual('/-/ide/projectabc');
});
it('renders download dropdown with links', () => {
......
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