debian-mirror-gitlab/spec/frontend/notes/components/discussion_resolve_with_issue_button_spec.js

28 lines
697 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import { GlButton } from '@gitlab/ui';
2022-04-04 11:22:00 +05:30
import { shallowMount } from '@vue/test-utils';
2019-07-07 11:18:12 +05:30
import { TEST_HOST } from 'spec/test_constants';
2020-01-01 13:55:28 +05:30
import ResolveWithIssueButton from '~/notes/components/discussion_resolve_with_issue_button.vue';
2019-07-07 11:18:12 +05:30
describe('ResolveWithIssueButton', () => {
let wrapper;
const url = `${TEST_HOST}/hello-world/`;
beforeEach(() => {
wrapper = shallowMount(ResolveWithIssueButton, {
propsData: {
url,
},
});
});
afterEach(() => {
wrapper.destroy();
});
it('it should have a link with the provided link property as href', () => {
2020-10-24 23:57:45 +05:30
const button = wrapper.find(GlButton);
2019-07-07 11:18:12 +05:30
expect(button.attributes().href).toBe(url);
});
});