Skip to content

Commit

Permalink
adding test for deleting a group that dose not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
nirajacharya2 committed Dec 20, 2023
1 parent ec06af9 commit 54758d8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/integration/Owncloud/OcisPhpSdk/GroupsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,13 @@ public function testDeleteGroupByIdNoPermission(): void
$this->expectException(UnauthorizedException::class);
$ocisEinstein->deleteGroupByID($groupId);
}

public function testDeleteNonExistingGroup(): void
{
$token = $this->getAccessToken("admin", "admin");
$ocis = new Ocis($this->ocisUrl, $token, ["verify" => false]);
$this->expectException(NotFoundException::class);
$ocis->deleteGroupByID("thisgroupdosenotexist");
}

}

0 comments on commit 54758d8

Please sign in to comment.