summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-25 15:14:29 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-25 15:14:29 +0200
commite1b89f0957d3fb93228968835641c03ef50622b0 (patch)
treef4a08dd122dca2769f3baa0097e9b7423d53267f /apps
parenteddc222369c254fa598a4ab1d7f4a9fecc3fae3f (diff)
parent338106124f249965d67c26b292e61e2113e304c1 (diff)
downloadnextcloud-server-e1b89f0957d3fb93228968835641c03ef50622b0.tar.gz
nextcloud-server-e1b89f0957d3fb93228968835641c03ef50622b0.zip
Merge pull request #24838 from owncloud/fix-failing-updatenotifications-tests
Fix failing update notifications tests
Diffstat (limited to 'apps')
-rw-r--r--apps/updatenotification/tests/Controller/AdminControllerTest.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php
index d8fc2dd335c..71364de4802 100644
--- a/apps/updatenotification/tests/Controller/AdminControllerTest.php
+++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php
@@ -95,10 +95,12 @@ class AdminControllerTest extends TestCase {
}
$this->config
- ->expects($this->once())
+ ->expects($this->exactly(2))
->method('getAppValue')
- ->with('core', 'lastupdatedat')
- ->willReturn('12345');
+ ->willReturnMap([
+ ['core', 'lastupdatedat', '', '12345'],
+ ['updatenotification', 'notify_groups', '["admin"]', '["admin"]'],
+ ]);
$this->dateTimeFormatter
->expects($this->once())
->method('formatDateTime')
@@ -115,6 +117,7 @@ class AdminControllerTest extends TestCase {
'currentChannel' => \OCP\Util::getChannel(),
'channels' => $channels,
'newVersionString' => '8.1.2',
+ 'notify_groups' => 'admin',
];
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
@@ -136,10 +139,12 @@ class AdminControllerTest extends TestCase {
}
$this->config
- ->expects($this->once())
+ ->expects($this->exactly(2))
->method('getAppValue')
- ->with('core', 'lastupdatedat')
- ->willReturn('12345');
+ ->willReturnMap([
+ ['core', 'lastupdatedat', '', '12345'],
+ ['updatenotification', 'notify_groups', '["admin"]', '["admin"]'],
+ ]);
$this->dateTimeFormatter
->expects($this->once())
->method('formatDateTime')
@@ -156,6 +161,7 @@ class AdminControllerTest extends TestCase {
'currentChannel' => \OCP\Util::getChannel(),
'channels' => $channels,
'newVersionString' => '',
+ 'notify_groups' => 'admin',
];
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');