Permalink
Browse files

fixed test and parameters

  • Loading branch information...
potatoqualitee committed Jan 10, 2019
1 parent 9fe5056 commit 67226f3c7bab15231f2de84165f4bfe685b57f2b
Showing with 4 additions and 5 deletions.
  1. +4 −5 tests/Set-DbaLogin.Tests.ps1
@@ -5,11 +5,10 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan
Describe "$CommandName Unit Tests" -Tag 'UnitTests' {
Context "Validate parameters" {
$command = Get-Command $CommandName
[object[]]$params = $command.Parameters.Keys
$knownParameters = 'SqlInstance', 'SqlCredential', 'Login', 'SecurePassword', 'Unlock', 'MustChange', 'NewName', 'Disable', 'Enable', 'DenyLogin', 'GrantLogin', 'AddRole', 'RemoveRole', 'EnableException', 'InputObject'
$paramCount = $knownParameters.Count
It "Contains our specific parameters" {
((Compare-Object -ReferenceObject $knownParameters -DifferenceObject $params -IncludeEqual | Where-Object SideIndicator -eq "==").Count) | Should Be $paramCount
[object[]]$params = (Get-ChildItem function:\Set-DbaLogin).Parameters.Keys
$knownParameters = 'SqlInstance', 'SqlCredential', 'Login', 'SecurePassword', 'DefaultDatabase', 'Unlock', 'MustChange', 'NewName', 'Disable', 'Enable', 'DenyLogin', 'GrantLogin', 'PasswordPolicyEnforced', 'AddRole', 'RemoveRole', 'InputObject', 'EnableException'
It "Should contain our specific parameters" {
( (Compare-Object -ReferenceObject $knownParameters -DifferenceObject $params -IncludeEqual | Where-Object SideIndicator -eq "==").Count ) | Should Be $knownParameters.Count
}

$systemRoles = @(

0 comments on commit 67226f3

Please sign in to comment.