Skip to content

Commit 4371d2e

Browse files
committed
fixup! test(users): Adapt tests to new admin delegation checks
1 parent 7e33ae9 commit 4371d2e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

apps/provisioning_api/tests/Controller/AppsControllerTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@ protected function setUp(): void {
4545
);
4646
}
4747

48+
protected function tearDown(): void {
49+
$this->userSession->setUser(null);
50+
}
51+
4852
public function testGetAppInfo() {
4953
$result = $this->api->getAppInfo('provisioning_api');
5054
$expected = $this->appManager->getAppInfo('provisioning_api');
5155
$this->assertEquals($expected, $result->getData());
5256
}
5357

54-
58+
5559
public function testGetAppInfoOnBadAppID() {
5660
$this->expectException(\OCP\AppFramework\OCS\OCSException::class);
5761
$this->expectExceptionCode(998);

apps/settings/tests/Controller/AdminSettingsControllerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ protected function setUp(): void {
8181

8282
protected function tearDown(): void {
8383
\OC::$server->getUserManager()->get($this->adminUid)->delete();
84+
\OC_User::setUserId(null);
85+
\OC::$server->getUserSession()->setUser(null);
8486

8587
parent::tearDown();
8688
}

0 commit comments

Comments
 (0)