From 6c34f5a212c04a5f384999146c1957cf983dcbf3 Mon Sep 17 00:00:00 2001 From: Phil Hughes <me@iamphill.com> Date: Wed, 17 May 2017 15:24:39 +0100 Subject: [PATCH] Added a test with markdown [ci skip] --- .../components/fields/description_spec.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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(); + }); + }); }); -- 2.30.9