debian-mirror-gitlab/spec/frontend/environments/environment_external_url_spec.js

17 lines
512 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import { mount } from '@vue/test-utils';
2020-03-13 15:44:24 +05:30
import ExternalUrlComp from '~/environments/components/environment_external_url.vue';
describe('External URL Component', () => {
let wrapper;
const externalUrl = 'https://gitlab.com';
beforeEach(() => {
2020-10-24 23:57:45 +05:30
wrapper = mount(ExternalUrlComp, { propsData: { externalUrl } });
2020-03-13 15:44:24 +05:30
});
it('should link to the provided externalUrl prop', () => {
expect(wrapper.attributes('href')).toEqual(externalUrl);
expect(wrapper.find('a').exists()).toBe(true);
});
});