diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-10-09 21:17:14 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-10-09 21:17:14 -0400 |
commit | 26e901dfe69c29d56f5e2164d4683bab57663bb0 (patch) | |
tree | 17eed8a0a6fc4aaf3b1779ae0090426c35ed4db7 /tests | |
parent | 9302ff82f3fbd2f8a257488b091ba2c0a0ce6289 (diff) |
Accept more file types for FileLinkProvider
Diffstat (limited to 'tests')
-rw-r--r-- | tests/units/ExternalLink/FileLinkProviderTest.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/units/ExternalLink/FileLinkProviderTest.php b/tests/units/ExternalLink/FileLinkProviderTest.php index 8cef82f8..8698e174 100644 --- a/tests/units/ExternalLink/FileLinkProviderTest.php +++ b/tests/units/ExternalLink/FileLinkProviderTest.php @@ -31,6 +31,21 @@ class FileLinkProviderTest extends Base $attachmentLinkProvider->setUserTextInput('file:///tmp/test.txt'); $this->assertTrue($attachmentLinkProvider->match()); + $attachmentLinkProvider->setUserTextInput('owncloud:///tmp/test.txt'); + $this->assertTrue($attachmentLinkProvider->match()); + + $attachmentLinkProvider->setUserTextInput('notebooks:///tmp/test.txt'); + $this->assertTrue($attachmentLinkProvider->match()); + + $attachmentLinkProvider->setUserTextInput('http://google.com/'); + $this->assertFalse($attachmentLinkProvider->match()); + + $attachmentLinkProvider->setUserTextInput('https://google.com/'); + $this->assertFalse($attachmentLinkProvider->match()); + + $attachmentLinkProvider->setUserTextInput('ftp://google.com/'); + $this->assertFalse($attachmentLinkProvider->match()); + $attachmentLinkProvider->setUserTextInput(''); $this->assertFalse($attachmentLinkProvider->match()); } |