Fix failing update notifications tests

This commit is contained in:
Joas Schilling 2016-05-25 12:11:51 +02:00
parent 25e6026fa6
commit 338106124f
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
1 changed files with 12 additions and 6 deletions

View File

@ -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, '');