summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/units/ExternalLink/FileLinkProviderTest.php15
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());
}