diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-25 17:08:18 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-25 17:08:18 -0400 |
commit | 30b58f56771aa54304069d40a62070c06f5308fc (patch) | |
tree | e0bb2bba21c561f96d27bb9cfc09d714aa21d332 /apps/user_external/tests/imap.php | |
parent | 4d17ed2f71c8cbb0d34c039aa7953b2427ce5c78 (diff) | |
parent | f25ccaff59c135d7f1f22196bf266916ef131b35 (diff) | |
download | nextcloud-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.php | 34 |
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')); + } +} |