fix: capture mobileApp scope tags
This commit is contained in:
parent
2e6e772ef9
commit
c499d93062
@ -319,7 +319,7 @@
|
||||
],
|
||||
'mobileApp' => [
|
||||
'resource' => 'deviceAppManagement/mobileApps',
|
||||
'allowed_select' => ['id', 'displayName', 'publisher', 'description', '@odata.type', 'createdDateTime', 'lastModifiedDateTime'],
|
||||
'allowed_select' => ['id', 'displayName', 'publisher', 'description', '@odata.type', 'createdDateTime', 'lastModifiedDateTime', 'roleScopeTagIds'],
|
||||
'allowed_expand' => [],
|
||||
'type_family' => [
|
||||
'#microsoft.graph.mobileApp',
|
||||
|
||||
@ -106,6 +106,7 @@
|
||||
$contract = $this->registry->get('mobileApp');
|
||||
|
||||
expect($contract)->not->toBeEmpty();
|
||||
expect($contract['allowed_select'] ?? [])->toContain('roleScopeTagIds');
|
||||
expect($contract['assignments_list_path'] ?? null)
|
||||
->toBe('/deviceAppManagement/mobileApps/{id}/assignments');
|
||||
expect($contract['assignments_create_path'] ?? null)
|
||||
|
||||
@ -34,6 +34,7 @@ public function getPolicy(string $policyType, string $policyId, array $options =
|
||||
'@odata.type' => '#microsoft.graph.win32LobApp',
|
||||
'createdDateTime' => '2025-01-01T00:00:00Z',
|
||||
'lastModifiedDateTime' => '2025-01-02T00:00:00Z',
|
||||
'roleScopeTagIds' => ['0', 'tag-1', 'tag-2'],
|
||||
'installCommandLine' => 'setup.exe /quiet',
|
||||
'largeIcon' => ['type' => 'image/png', 'value' => '...'],
|
||||
],
|
||||
@ -155,7 +156,9 @@ public function request(string $method, string $path, array $options = []): Grap
|
||||
'@odata.type',
|
||||
'createdDateTime',
|
||||
'lastModifiedDateTime',
|
||||
'roleScopeTagIds',
|
||||
]);
|
||||
expect($result['payload']['roleScopeTagIds'])->toBe(['0', 'tag-1', 'tag-2']);
|
||||
expect($result['payload'])->not->toHaveKey('installCommandLine');
|
||||
expect($result['payload'])->not->toHaveKey('largeIcon');
|
||||
expect($client->requests[0][0])->toBe('getPolicy');
|
||||
@ -163,5 +166,6 @@ public function request(string $method, string $path, array $options = []): Grap
|
||||
expect($client->requests[0][2])->toBe('app-123');
|
||||
expect($client->requests[0][3]['select'] ?? null)->toBeArray();
|
||||
expect($client->requests[0][3]['select'])->toContain('displayName');
|
||||
expect($client->requests[0][3]['select'])->toContain('roleScopeTagIds');
|
||||
expect($client->requests[0][3]['select'])->not->toContain('@odata.type');
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user