Skip to content

Commit 73bc82b

Browse files
committed
Update pester tests.
1 parent fd85441 commit 73bc82b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Identity.SignIns/Identity.SignIns/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ subject-prefix: ''
3838
3939
``` yaml
4040
directive:
41-
- remove-path-by-operation: ^identity_(Get|Create|Delete|Update|List)ConditionalAccess$|^policies\.policyRoot_.*PolicyRoot|^policies_(Get|Create|Delete|Update|List)ConditionalAccessPolicies$|^invitations\.invitation_(List|Get|Update|Delete)Invitation$|^invitations_(.*)InvitedUser|^identityProtection\.identityProtectionRoot.*$
41+
- remove-path-by-operation: ^identity_(Get|Create|Delete|Update|List)ConditionalAccess$|^policies\.policyRoot_.*PolicyRoot|^policies_(Get|Create|Delete|Update|List)ConditionalAccessPolicies$|^invitations\.invitation_(List|Get|Update|Delete)Invitation$|^invitations_(.*)InvitedUser$|^identityProtection\.identityProtectionRoot_(.*)$
4242
# Rename cmdlets with duplicates in their name.
4343
- where:
4444
subject: ^(Oauth2PermissionGrant)(\1)+
@@ -61,9 +61,9 @@ directive:
6161
remove: true
6262
# Rename cmdlets
6363
- where:
64-
subject: ^(IdentityProtection)(.*)$
64+
subject: ^(.*)(IdentityProtection)(.*)$
6565
set:
66-
subject: $1
66+
subject: $1$3
6767
```
6868
### Versioning
6969

src/Identity.SignIns/Identity.SignIns/test/v1.0-beta/New-MgInvitation.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Describe 'New-MgInvitation' {
4646
Mail = $env.Users[0].Mail
4747
UserPrincipalName = $env.Users[0].Mail
4848
}
49-
{ New-MgInvitation -InvitedUser $MyUser -ErrorAction Stop } | Should -Throw -ErrorId 'BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgInvitation_CreateExpanded1' -ExpectedMessage 'Invalid Email Address' -ExceptionType 'Microsoft.Graph.PowerShell.Runtime.RestException<Microsoft.Graph.PowerShell.Models.IOdataError>'
49+
{ New-MgInvitation -InvitedUser $MyUser -ErrorAction Stop } | Should -Throw -ErrorId 'BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgInvitation_CreateExpanded' -ExpectedMessage 'Invalid Email Address' -ExceptionType 'Microsoft.Graph.PowerShell.Runtime.RestException<Microsoft.Graph.PowerShell.Models.IOdataError>'
5050
}
5151
}
5252

@@ -74,7 +74,7 @@ Describe 'New-MgInvitation' {
7474
Mail = $env.Users[0].Mail
7575
UserPrincipalName = $env.Users[0].Mail
7676
}
77-
{ New-MgInvitation -BodyParameter @{ InvitedUser = $MyUser } -ErrorAction Stop } | Should -Throw -ErrorId 'BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgInvitation_Create1' -ExpectedMessage 'Invalid Email Address' -ExceptionType 'Microsoft.Graph.PowerShell.Runtime.RestException<Microsoft.Graph.PowerShell.Models.IOdataError>'
77+
{ New-MgInvitation -BodyParameter @{ InvitedUser = $MyUser } -ErrorAction Stop } | Should -Throw -ErrorId 'BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgInvitation_Create' -ExpectedMessage 'Invalid Email Address' -ExceptionType 'Microsoft.Graph.PowerShell.Runtime.RestException<Microsoft.Graph.PowerShell.Models.IOdataError>'
7878
}
7979
}
8080
}

src/Identity.SignIns/Identity.SignIns/test/v1.0/New-MgInvitation.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Describe 'New-MgInvitation' {
4646
Mail = $env.Users[0].Mail
4747
UserPrincipalName = $env.Users[0].Mail
4848
}
49-
{ New-MgInvitation -InvitedUser $MyUser -ErrorAction Stop } | Should -Throw -ErrorId 'BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgInvitation_CreateExpanded' -ExpectedMessage 'Invalid Email Address' -ExceptionType 'Microsoft.Graph.PowerShell.Runtime.RestException<Microsoft.Graph.PowerShell.Models.IOdataError>'
49+
{ New-MgInvitation -InvitedUser $MyUser -ErrorAction Stop } | Should -Throw -ErrorId 'BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgInvitation_CreateExpanded1' -ExpectedMessage 'Invalid Email Address' -ExceptionType 'Microsoft.Graph.PowerShell.Runtime.RestException<Microsoft.Graph.PowerShell.Models.IOdataError>'
5050
}
5151
}
5252

@@ -74,7 +74,7 @@ Describe 'New-MgInvitation' {
7474
Mail = $env.Users[0].Mail
7575
UserPrincipalName = $env.Users[0].Mail
7676
}
77-
{ New-MgInvitation -BodyParameter @{ InvitedUser = $MyUser } -ErrorAction Stop } | Should -Throw -ErrorId 'BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgInvitation_Create' -ExpectedMessage 'Invalid Email Address' -ExceptionType 'Microsoft.Graph.PowerShell.Runtime.RestException<Microsoft.Graph.PowerShell.Models.IOdataError>'
77+
{ New-MgInvitation -BodyParameter @{ InvitedUser = $MyUser } -ErrorAction Stop } | Should -Throw -ErrorId 'BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgInvitation_Create1' -ExpectedMessage 'Invalid Email Address' -ExceptionType 'Microsoft.Graph.PowerShell.Runtime.RestException<Microsoft.Graph.PowerShell.Models.IOdataError>'
7878
}
7979
}
8080
}

0 commit comments

Comments
 (0)