aboutsummaryrefslogtreecommitdiff
path: root/test/unit/specs/components/rich_content.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/specs/components/rich_content.spec.js')
-rw-r--r--test/unit/specs/components/rich_content.spec.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js
index 05c0b259..f2c3f04e 100644
--- a/test/unit/specs/components/rich_content.spec.js
+++ b/test/unit/specs/components/rich_content.spec.js
@@ -354,4 +354,32 @@ describe('RichContent', () => {
expect(wrapper.html()).to.eql(compwrap(html))
})
+
+ it('Greentext + last mentions', () => {
+ const html = [
+ '>quote',
+ makeMention('lol'),
+ '>quote',
+ '>quote'
+ ].join('\n')
+ const expected = [
+ '<span class="greentext">&gt;quote</span>',
+ stubMention('lol'),
+ '<span class="greentext">&gt;quote</span>',
+ '<span class="greentext">&gt;quote</span>'
+ ].join('\n')
+
+ const wrapper = shallowMount(RichContent, {
+ localVue,
+ propsData: {
+ handleLinks: true,
+ greentext: true,
+ emoji: [],
+ html
+ }
+ })
+
+ expect(wrapper.html()).to.eql(compwrap(expected))
+ })
+
})