2020-08-10 14:09:54 -04:00
|
|
|
import { mount } from '@vue/test-utils';
|
2020-02-06 16:08:48 -05:00
|
|
|
import ExternalUrlComp from '~/environments/components/environment_external_url.vue';
|
|
|
|
|
|
|
|
describe('External URL Component', () => {
|
|
|
|
let wrapper;
|
|
|
|
const externalUrl = 'https://gitlab.com';
|
|
|
|
|
|
|
|
beforeEach(() => {
|
2020-08-10 14:09:54 -04:00
|
|
|
wrapper = mount(ExternalUrlComp, { propsData: { externalUrl } });
|
2020-02-06 16:08:48 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should link to the provided externalUrl prop', () => {
|
|
|
|
expect(wrapper.attributes('href')).toEqual(externalUrl);
|
|
|
|
expect(wrapper.find('a').exists()).toBe(true);
|
|
|
|
});
|
|
|
|
});
|