summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/tests/groupstest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/provisioning_api/tests/groupstest.php')
-rw-r--r--apps/provisioning_api/tests/groupstest.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/provisioning_api/tests/groupstest.php b/apps/provisioning_api/tests/groupstest.php
index f4f3b194944..84950d923e4 100644
--- a/apps/provisioning_api/tests/groupstest.php
+++ b/apps/provisioning_api/tests/groupstest.php
@@ -373,6 +373,27 @@ class GroupsTest extends \Test\TestCase {
$this->assertTrue($result->succeeded());
}
+ public function testAddGroupWithSpecialChar() {
+ $this->request
+ ->method('getParam')
+ ->with('groupid')
+ ->willReturn('Iñtërnâtiônàlizætiøn');
+
+ $this->groupManager
+ ->method('groupExists')
+ ->with('NewGroup')
+ ->willReturn(false);
+
+ $this->groupManager
+ ->expects($this->once())
+ ->method('createGroup')
+ ->with('Iñtërnâtiônàlizætiøn');
+
+ $result = $this->api->addGroup([]);
+ $this->assertInstanceOf('OC_OCS_Result', $result);
+ $this->assertTrue($result->succeeded());
+ }
+
public function testDeleteGroupNonExisting() {
$result = $this->api->deleteGroup([
'groupid' => 'NonExistingGroup'