diff options
author | Simon Knox <simon@gitlab.com> | 2017-12-04 16:19:07 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-12-04 16:19:07 +0000 |
commit | bf85a90037714c3ba290c9966f435adbfa90b074 (patch) | |
tree | 3fcd899154c11f3e179303cdd341c19cdcdeaaae /spec/javascripts/notes/components/note_attachment_spec.js | |
parent | a1cd9be42910c89192e82659c09bf0242c8e5dae (diff) | |
download | gitlab-ce-bf85a90037714c3ba290c9966f435adbfa90b074.tar.gz |
issue note component rename
Diffstat (limited to 'spec/javascripts/notes/components/note_attachment_spec.js')
-rw-r--r-- | spec/javascripts/notes/components/note_attachment_spec.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/javascripts/notes/components/note_attachment_spec.js b/spec/javascripts/notes/components/note_attachment_spec.js new file mode 100644 index 00000000000..b14a518b622 --- /dev/null +++ b/spec/javascripts/notes/components/note_attachment_spec.js @@ -0,0 +1,23 @@ +import Vue from 'vue'; +import noteAttachment from '~/notes/components/note_attachment.vue'; + +describe('issue note attachment', () => { + it('should render properly', () => { + const props = { + attachment: { + filename: 'dk.png', + image: true, + url: '/dk.png', + }, + }; + + const Component = Vue.extend(noteAttachment); + const vm = new Component({ + propsData: props, + }).$mount(); + + expect(vm.$el.classList.contains('note-attachment')).toBeTruthy(); + expect(vm.$el.querySelector('img').src).toContain(props.attachment.url); + expect(vm.$el.querySelector('a').href).toContain(props.attachment.url); + }); +}); |