summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/tests
diff options
context:
space:
mode:
authorTom Needham <tom@owncloud.com>2015-12-04 13:21:24 +0000
committerMorris Jobke <hey@morrisjobke.de>2016-01-08 13:35:00 +0100
commit673a8a1e4a15edb3e6199432fc7e53714a651bb3 (patch)
treef3c052aa13402e9ad9decf793922fc753cfd7d9d /apps/provisioning_api/tests
parenta0345b94650f9ded7b86d53b27624557868747e4 (diff)
downloadnextcloud-server-673a8a1e4a15edb3e6199432fc7e53714a651bb3.tar.gz
nextcloud-server-673a8a1e4a15edb3e6199432fc7e53714a651bb3.zip
Remove unnecessary group name validation
Diffstat (limited to 'apps/provisioning_api/tests')
-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'