gitlab-org--gitlab-foss/spec/javascripts/issue_show/issue_title_spec.js
2017-04-06 01:13:06 +00:00

22 lines
564 B
JavaScript

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');
});
});