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" {
206206 $MgCommand [0 ].Command | Should - BeLike " New-MgApplication*"
207207 } | Should -Not - Throw
208208 }
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+ }
209222 It ' Should throw error when command name is invalid' {
210223 {
211224 Find-MgGraphCommand - Command " New-MgInvalid" - ErrorAction Stop | Out-Null
212225 } | Should - Throw - ExpectedMessage " *'New-MgInvalid' is not a valid Microsoft Graph PowerShell command.*"
213226 }
227+
214228 }
215229 }
216230}
You can’t perform that action at this time.
0 commit comments