diff options
author | Regis Boudinot <boudinot.regis@yahoo.com> | 2017-04-06 01:13:06 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-04-06 01:13:06 +0000 |
commit | 1c783007e6e2db25623eac3b3b1ef15bfdf95193 (patch) | |
tree | 5e7fce4b69fdaafcbb5dfd4aa75d9ff3cafb3909 /spec/javascripts | |
parent | 4e3de96ed059db39ee16ce99e5a4b4e8de14ea55 (diff) | |
download | gitlab-ce-1c783007e6e2db25623eac3b3b1ef15bfdf95193.tar.gz |
Issue title realtime
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/issue_show/issue_title_spec.js | 22 | ||||
-rw-r--r-- | spec/javascripts/test_bundle.js | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/spec/javascripts/issue_show/issue_title_spec.js b/spec/javascripts/issue_show/issue_title_spec.js new file mode 100644 index 00000000000..806d728a874 --- /dev/null +++ b/spec/javascripts/issue_show/issue_title_spec.js @@ -0,0 +1,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'); + }); +}); diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js index b30c5da8822..07dc51a7815 100644 --- a/spec/javascripts/test_bundle.js +++ b/spec/javascripts/test_bundle.js @@ -64,6 +64,7 @@ if (process.env.BABEL_ENV === 'coverage') { './snippet/snippet_bundle.js', './terminal/terminal_bundle.js', './users/users_bundle.js', + './issue_show/index.js', ]; describe('Uncovered files', function () { |