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

issue_title_spec.js « issue_show « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 806d728a8742bbe6c997e0413bcc65e4cf790cf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import Vue from 'vue';
import issueTitle from '~/issue_show/issue_title';

describe('Issue Title', () => {
  let IssueTitleComponent;

  beforeEach(() => {
    IssueTitleComponent = Vue.extend(issueTitle);
  });

  it('should render a title', () => {
    const component = new IssueTitleComponent({
      propsData: {
        initialTitle: 'wow',
        endpoint: '/gitlab-org/gitlab-shell/issues/9/rendered_title',
      },
    }).$mount();

    expect(component.$el.classList).toContain('title');
    expect(component.$el.innerHTML).toContain('wow');
  });
});