Welcome to mirror list, hosted at ThFree Co, Russian Federation.

discussion_resolve_with_issue_button_spec.js « components « notes « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5bc6282db0327227c32c16d2b9286df4f6a8cd2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { GlButton } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import { TEST_HOST } from 'spec/test_constants';
import ResolveWithIssueButton from '~/notes/components/discussion_resolve_with_issue_button.vue';

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', () => {
    const button = wrapper.find(GlButton);

    expect(button.attributes().href).toBe(url);
  });
});