]> source.dussan.org Git - nextcloud-server.git/commitdiff
test setTagGroups with empty groupids 3931/head
authorJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 2 Mar 2017 13:17:20 +0000 (14:17 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 20 Mar 2017 04:01:46 +0000 (22:01 -0600)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
tests/lib/SystemTag/SystemTagManagerTest.php

index e697e373465aeb44f2dd5a9b5d10551fa7058bee..61fac99ca6c77fe03760bde613dfdc6eb2fbb332 100644 (file)
@@ -516,6 +516,15 @@ class SystemTagManagerTest extends TestCase {
                $this->assertEquals([], $this->tagManager->getTagGroups($tag2));
        }
 
+       /**
+        * empty groupIds should be ignored
+        */
+       public function testEmptyTagGroup() {
+               $tag1 = $this->tagManager->createTag('tag1', true, false);
+               $this->tagManager->setTagGroups($tag1, ['']);
+               $this->assertEquals([], $this->tagManager->getTagGroups($tag1));
+       }
+
        /**
         * @param ISystemTag $tag1
         * @param ISystemTag $tag2