summaryrefslogtreecommitdiff
path: root/tests/units/Helper
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-02-16 22:06:53 -0500
committerFrederic Guillot <fred@kanboard.net>2016-02-16 22:06:53 -0500
commit924949850322144036e281bf94fb8b88c42bbd74 (patch)
tree5e57db68f507849bb8c7a92574fbe6a3f319c009 /tests/units/Helper
parent4961805e0f8a8c3630ace144450fdd97048b3929 (diff)
Add file preview for Markdown and text files
Diffstat (limited to 'tests/units/Helper')
-rw-r--r--tests/units/Helper/FileHelperText.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/units/Helper/FileHelperText.php b/tests/units/Helper/FileHelperText.php
index 2c6bc6ad..6a1b78a4 100644
--- a/tests/units/Helper/FileHelperText.php
+++ b/tests/units/Helper/FileHelperText.php
@@ -24,4 +24,13 @@ class FileHelperTest extends Base
$this->assertEquals('image/jpeg', $helper->getImageMimeType('My File.bmp'));
$this->assertEquals('image/jpeg', $helper->getImageMimeType('My File'));
}
+
+ public function testGetPreviewType()
+ {
+ $helper = new File($this->container);
+ $this->assertEquals('text', $helper->getPreviewType('test.txt'));
+ $this->assertEquals('markdown', $helper->getPreviewType('test.markdown'));
+ $this->assertEquals('md', $helper->getPreviewType('test.md'));
+ $this->assertEquals(null, $helper->getPreviewType('test.doc'));
+ }
}