summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js')
-rw-r--r--spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js b/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js
new file mode 100644
index 00000000000..976e38c15ee
--- /dev/null
+++ b/spec/frontend/vue_shared/components/notes/placeholder_system_note_spec.js
@@ -0,0 +1,27 @@
+import Vue from 'vue';
+import placeholderSystemNote from '~/vue_shared/components/notes/placeholder_system_note.vue';
+import mountComponent from 'helpers/vue_mount_component_helper';
+
+describe('placeholder system note component', () => {
+ let PlaceholderSystemNote;
+ let vm;
+
+ beforeEach(() => {
+ PlaceholderSystemNote = Vue.extend(placeholderSystemNote);
+ });
+
+ afterEach(() => {
+ vm.$destroy();
+ });
+
+ it('should render system note placeholder with plain text', () => {
+ vm = mountComponent(PlaceholderSystemNote, {
+ note: { body: 'This is a placeholder' },
+ });
+
+ expect(vm.$el.tagName).toEqual('LI');
+ expect(vm.$el.querySelector('.timeline-content em').textContent.trim()).toEqual(
+ 'This is a placeholder',
+ );
+ });
+});