Skip to content

Commit

Permalink
Cleanup for issue #332
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Jul 9, 2019
1 parent 6f6a95d commit e881edb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
([issue #402](https://github.com/PowerShell/xActiveDirectory/issues/402)).
- Fixes ChangePasswordAtLogon Property to be only set to `true` at User
Creation ([issue #414](https://github.com/PowerShell/xActiveDirectory/issues/414)).
- xADDomain
- Updated tests and replaced `Write-Error` with `throw`
([issue #332](https://github.com/PowerShell/xActiveDirectory/pull/332)).
- Changes to xADRecycleBin
- Updated tests and remove unnecessary mocks of `Write-Error`.

## 3.0.0.0

Expand Down
6 changes: 0 additions & 6 deletions Tests/Unit/MSFT_xADRecycleBin.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ try
}

Context 'When Get-AdObject throws an exception' {
Mock -CommandName Write-Error

It 'Should throw ADIdentityNotFoundException' {
Mock -CommandName Get-ADObject -MockWith {
throw (New-Object -TypeName Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException)
Expand Down Expand Up @@ -167,8 +165,6 @@ try
}

Context 'When Get-AdObject throws an exception' {
Mock -CommandName Write-Error

It 'Should throw ADIdentityNotFoundException' {
Mock -CommandName Get-ADObject -MockWith {
throw (New-Object -TypeName Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException)
Expand Down Expand Up @@ -231,8 +227,6 @@ try
}

Context 'When Get-AdForest throws an exception' {
Mock -CommandName Write-Error

It 'Should throw ADIdentityNotFoundException' {
Mock -CommandName Get-ADForest -MockWith {
throw (New-Object -TypeName Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException)
Expand Down

0 comments on commit e881edb

Please sign in to comment.