From e24fa69b04af0df70359008e1e15d56cf7f09a1e Mon Sep 17 00:00:00 2001 From: David Baldwynn Date: Fri, 4 Dec 2015 22:59:22 -0800 Subject: [PATCH] Added test case for unsupported type --- test/views/attachment_view.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/views/attachment_view.js diff --git a/test/views/attachment_view.js b/test/views/attachment_view.js new file mode 100644 index 00000000..70325b47 --- /dev/null +++ b/test/views/attachment_view.js @@ -0,0 +1,11 @@ +describe('AttachmentView', function() { + + it('should display an error for an unsupported type', function() { + var attachment = { + contentType: 'html/text'; + } + var view = new Whisper.AttachmentView({model: attachment}).render(); + assert.match(view.$el.text(), /Sorry, your attachment has a type, html, that is not currently supported./); + }); + +});