File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/Authentication/Authentication/test Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -206,11 +206,25 @@ Describe "Find-MgGraphCommand Command" {
206
206
$MgCommand [0 ].Command | Should - BeLike " New-MgApplication*"
207
207
} | Should -Not - Throw
208
208
}
209
+ It ' Should find the API reference link' {
210
+ {
211
+ $MgCommand = Find-MgGraphCommand - Command " Get-MgUser"
212
+ $MgCommand [0 ].APIReferenceLink | Should - Be " https://learn.microsoft.com/graph/api/users-get"
213
+ } | Should -Not - Throw
214
+ {
215
+ $MgCommand = Find-MgGraphCommand - Command " Get-MgUser"
216
+ $MgCommand | Should - HaveCount 2 # /users and /users/{id}.
217
+ $MgCommand [0 ].Method | Select-Object - Unique | Should - Be " GET"
218
+ $MgCommand [0 ].APIVersion | Select-Object - Unique | Should - Be " v1.0"
219
+ $MgCommand [0 ].Command | Select-Object - Unique | Should - Be " Get-MgUser"
220
+ } | Should -Not - Throw
221
+ }
209
222
It ' Should throw error when command name is invalid' {
210
223
{
211
224
Find-MgGraphCommand - Command " New-MgInvalid" - ErrorAction Stop | Out-Null
212
225
} | Should - Throw - ExpectedMessage " *'New-MgInvalid' is not a valid Microsoft Graph PowerShell command.*"
213
226
}
227
+
214
228
}
215
229
}
216
230
}
You can’t perform that action at this time.
0 commit comments