diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/tags.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/tags.php b/tests/lib/tags.php index 547cd302d5d..a50855c88f3 100644 --- a/tests/lib/tags.php +++ b/tests/lib/tags.php @@ -62,6 +62,16 @@ class Test_Tags extends \Test\TestCase { parent::tearDown(); } + public function testTagManagerWithoutUserReturnsNull() { + $this->userSession = $this->getMock('\OCP\IUserSession'); + $this->userSession + ->expects($this->any()) + ->method('getUser') + ->will($this->returnValue(null)); + $this->tagMgr = new OC\TagManager($this->tagMapper, $this->userSession); + $this->assertNull($this->tagMgr->load($this->objectType)); + } + public function testInstantiateWithDefaults() { $defaultTags = array('Friends', 'Family', 'Work', 'Other'); |