From ee009f63dd2f4856f8daf29d66301f67ab8f2021 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 13 Nov 2016 00:08:03 +0100 Subject: Don't break status parsing when link class is missing. --- test/unit/specs/services/status_parser/status_parses.spec.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/unit/specs/services/status_parser/status_parses.spec.js b/test/unit/specs/services/status_parser/status_parses.spec.js index e6d185f8..65808d84 100644 --- a/test/unit/specs/services/status_parser/status_parses.spec.js +++ b/test/unit/specs/services/status_parser/status_parses.spec.js @@ -4,8 +4,14 @@ import { removeAttachmentLinks } from '../../../../../src/services/status_parser describe('statusParser.removeAttachmentLinks', () => { const exampleWithoutAttachmentLinks = '
@dwmatiz
' + it('removes attachment links', () => { const parsed = removeAttachmentLinks(example) expect(parsed).to.eql(exampleWithoutAttachmentLinks) }) + + it('works when the class is empty', () => { + const parsed = removeAttachmentLinks('') + expect(parsed).to.eql('') + }) }) -- cgit v1.2.3-70-g09d2