aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_external/tests/imap.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-07-25 17:08:18 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-07-25 17:08:18 -0400
commit30b58f56771aa54304069d40a62070c06f5308fc (patch)
treee0bb2bba21c561f96d27bb9cfc09d714aa21d332 /apps/user_external/tests/imap.php
parent4d17ed2f71c8cbb0d34c039aa7953b2427ce5c78 (diff)
parentf25ccaff59c135d7f1f22196bf266916ef131b35 (diff)
downloadnextcloud-server-30b58f56771aa54304069d40a62070c06f5308fc.tar.gz
nextcloud-server-30b58f56771aa54304069d40a62070c06f5308fc.zip
Merge branch 'master' into share_api
Conflicts: apps/calendar/js/loader.js apps/contacts/index.php apps/contacts/js/loader.js apps/files/js/files.js apps/files_sharing/sharedstorage.php lib/filesystemview.php
Diffstat (limited to 'apps/user_external/tests/imap.php')
-rw-r--r--apps/user_external/tests/imap.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/apps/user_external/tests/imap.php b/apps/user_external/tests/imap.php
new file mode 100644
index 00000000000..c703b32107f
--- /dev/null
+++ b/apps/user_external/tests/imap.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+class Test_User_Imap extends UnitTestCase{
+ /**
+ * @var OC_User_IMAP $instance
+ */
+ private $instance;
+
+ private function getConfig(){
+ return include(__DIR__.'/config.php');
+ }
+
+ function skip(){
+ $config=$this->getConfig();
+ $this->skipUnless($config['imap']['run']);
+ }
+
+ function setUp(){
+ $config=$this->getConfig();
+ $this->instance=new OC_User_IMAP($config['imap']['mailbox']);
+ }
+
+ function testLogin(){
+ $config=$this->getConfig();
+ $this->assertEqual($config['imap']['user'],$this->instance->checkPassword($config['imap']['user'],$config['imap']['password']));
+ $this->assertFalse($this->instance->checkPassword($config['imap']['user'],$config['imap']['password'].'foo'));
+ }
+}