summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-17 15:24:39 +0100
committerPhil Hughes <me@iamphill.com>2017-05-17 15:24:57 +0100
commit6c34f5a212c04a5f384999146c1957cf983dcbf3 (patch)
treec2a455b3ebc6bc6cdca1131667a88146f13b8c97
parent35b5ea0af7c40671bf15ef5e2ac4dc4aafc75440 (diff)
downloadgitlab-ce-6c34f5a212c04a5f384999146c1957cf983dcbf3.tar.gz
Added a test with markdown
[ci skip]
-rw-r--r--spec/javascripts/issue_show/components/fields/description_spec.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/javascripts/issue_show/components/fields/description_spec.js b/spec/javascripts/issue_show/components/fields/description_spec.js
index d13362ef8e6..05e628ca34c 100644
--- a/spec/javascripts/issue_show/components/fields/description_spec.js
+++ b/spec/javascripts/issue_show/components/fields/description_spec.js
@@ -19,7 +19,7 @@ describe('Description field component', () => {
propsData: {
markdownPreviewUrl: '/',
markdownDocs: '/',
- store,
+ formState: store.formState,
},
}).$mount();
@@ -31,4 +31,16 @@ describe('Description field component', () => {
vm.$el.querySelector('.md-area textarea').value,
).toBe('test');
});
+
+ it('renders markdown field with a markdown description', (done) => {
+ store.formState.description = '**test**';
+
+ Vue.nextTick(() => {
+ expect(
+ vm.$el.querySelector('.md-area textarea').value,
+ ).toBe('**test**');
+
+ done();
+ });
+ });
});