summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2023-03-05 12:02:38 +0100
committerBenjamin Brahmer <info@b-brahmer.de>2023-03-13 14:39:15 +0100
commitea8002e2d9a4ea82d01987741aefcae275379ad9 (patch)
tree9fb781fc1705c7a224ed9d22a648461527de00f8 /tests
parent0d31caac83378abe369602b87e5e55e7cccb673d (diff)
add cron status badge to admin setting
Display a info card in the settings, indicating when the last news update job ran. Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Service/StatusServiceTest.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/Unit/Service/StatusServiceTest.php b/tests/Unit/Service/StatusServiceTest.php
index dfe3dfd55..fdfe41af5 100644
--- a/tests/Unit/Service/StatusServiceTest.php
+++ b/tests/Unit/Service/StatusServiceTest.php
@@ -16,6 +16,7 @@ namespace OCA\News\Tests\Unit\Service;
use OCA\News\Service\StatusService;
use OCP\IConfig;
use OCP\IDBConnection;
+use OCP\BackgroundJob\IJobList;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -37,6 +38,12 @@ class StatusServiceTest extends TestCase
*/
private $service;
+ /**
+ * @var IJobList
+ */
+ private $jobList;
+
+
public function setUp(): void
{
$this->settings = $this->getMockBuilder(IConfig::class)
@@ -45,7 +52,10 @@ class StatusServiceTest extends TestCase
$this->connection = $this->getMockBuilder(IDBConnection::class)
->disableOriginalConstructor()
->getMock();
- $this->service = new StatusService($this->settings, $this->connection);
+ $this->jobList = $this->getMockBuilder(IJobList::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->service = new StatusService($this->settings, $this->connection, $this->jobList);
}
public function testGetStatus()