Fix failing update notifications tests
This commit is contained in:
parent
25e6026fa6
commit
338106124f
|
@ -95,10 +95,12 @@ class AdminControllerTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->once())
|
->expects($this->exactly(2))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'lastupdatedat')
|
->willReturnMap([
|
||||||
->willReturn('12345');
|
['core', 'lastupdatedat', '', '12345'],
|
||||||
|
['updatenotification', 'notify_groups', '["admin"]', '["admin"]'],
|
||||||
|
]);
|
||||||
$this->dateTimeFormatter
|
$this->dateTimeFormatter
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('formatDateTime')
|
->method('formatDateTime')
|
||||||
|
@ -115,6 +117,7 @@ class AdminControllerTest extends TestCase {
|
||||||
'currentChannel' => \OCP\Util::getChannel(),
|
'currentChannel' => \OCP\Util::getChannel(),
|
||||||
'channels' => $channels,
|
'channels' => $channels,
|
||||||
'newVersionString' => '8.1.2',
|
'newVersionString' => '8.1.2',
|
||||||
|
'notify_groups' => 'admin',
|
||||||
];
|
];
|
||||||
|
|
||||||
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
||||||
|
@ -136,10 +139,12 @@ class AdminControllerTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->config
|
$this->config
|
||||||
->expects($this->once())
|
->expects($this->exactly(2))
|
||||||
->method('getAppValue')
|
->method('getAppValue')
|
||||||
->with('core', 'lastupdatedat')
|
->willReturnMap([
|
||||||
->willReturn('12345');
|
['core', 'lastupdatedat', '', '12345'],
|
||||||
|
['updatenotification', 'notify_groups', '["admin"]', '["admin"]'],
|
||||||
|
]);
|
||||||
$this->dateTimeFormatter
|
$this->dateTimeFormatter
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('formatDateTime')
|
->method('formatDateTime')
|
||||||
|
@ -156,6 +161,7 @@ class AdminControllerTest extends TestCase {
|
||||||
'currentChannel' => \OCP\Util::getChannel(),
|
'currentChannel' => \OCP\Util::getChannel(),
|
||||||
'channels' => $channels,
|
'channels' => $channels,
|
||||||
'newVersionString' => '',
|
'newVersionString' => '',
|
||||||
|
'notify_groups' => 'admin',
|
||||||
];
|
];
|
||||||
|
|
||||||
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
$expected = new TemplateResponse('updatenotification', 'admin', $params, '');
|
||||||
|
|
Loading…
Reference in New Issue