mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Add regex to match Windows 10 calendar user-agent
* Match first part of the Windows 10 calendar user-agent * Exposes subscribed calendars for Windows 10 calendar * Update unit test Signed-off-by: Mikael Saarinen <mikaels@iki.fi>
This commit is contained in:
parent
e065324e9b
commit
14c33bb2e9
2 changed files with 6 additions and 3 deletions
|
|
@ -40,9 +40,12 @@ class Plugin extends ServerPlugin {
|
|||
* list of regular expressions for calendar user agents,
|
||||
* that do not support subscriptions on their own
|
||||
*
|
||||
* /^MSFT-WIN-3/ - Windows 10 Calendar
|
||||
* @var string[]
|
||||
*/
|
||||
public const ENABLE_FOR_CLIENTS = [];
|
||||
public const ENABLE_FOR_CLIENTS = [
|
||||
"/^MSFT-WIN-3/"
|
||||
];
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class PluginTest extends \Test\TestCase {
|
|||
$request = $this->createMock(IRequest::class);
|
||||
$request->expects($this->at(0))
|
||||
->method('isUserAgent')
|
||||
->with([])
|
||||
->with(Plugin::ENABLE_FOR_CLIENTS)
|
||||
->willReturn(false);
|
||||
|
||||
$request->expects($this->at(1))
|
||||
|
|
@ -48,7 +48,7 @@ class PluginTest extends \Test\TestCase {
|
|||
$request = $this->createMock(IRequest::class);
|
||||
$request->expects($this->at(0))
|
||||
->method('isUserAgent')
|
||||
->with([])
|
||||
->with(Plugin::ENABLE_FOR_CLIENTS)
|
||||
->willReturn(false);
|
||||
|
||||
$request->expects($this->at(1))
|
||||
|
|
|
|||
Loading…
Reference in a new issue