Skip to content

Commit 00c7862

Browse files
committed
test: fix failing template test
Signed-off-by: Anna Larch <anna@nextcloud.com>
1 parent 59fdf96 commit 00c7862

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

tests/Controller/ActivitiesControllerTest.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
use OCP\IL10N;
3434
use OCP\IRequest;
3535
use OCP\IURLGenerator;
36-
use OCP\Server;
37-
use OCP\Template;
3836
use PHPUnit\Framework\Attributes\Group;
3937
use PHPUnit\Framework\MockObject\MockObject;
4038

@@ -103,13 +101,6 @@ protected function getController(array $methods = []): ActivitiesController {
103101
}
104102

105103
public function testShowList(): void {
106-
$manager = Server::get(Template\ITemplateManager::class);
107-
$template = $manager->getTemplate('activity', 'stream.app.navigation', '');
108-
$template->assign('activeNavigation', 'all');
109-
$template->assign('navigations', []);
110-
$template->assign('rssLink', '');
111-
$template->assign('personalSettingsLink', '');
112-
113104
$this->eventDispatcher->expects($this->once())
114105
->method('dispatch')
115106
->with('OCA\Activity::loadAdditionalScripts', $this->anything());
@@ -120,7 +111,7 @@ public function testShowList(): void {
120111
->willReturn('all');
121112

122113
$templateResponse = $this->controller->showList();
123-
$renderedResponse = $templateResponse->render();
124-
$this->assertNotEmpty($renderedResponse);
114+
$this->assertEquals('app-main', $templateResponse->getTemplateName());
115+
$this->assertEquals('activity', $templateResponse->getAppName());
125116
}
126117
}

0 commit comments

Comments
 (0)