Skip to content

Commit

Permalink
Validate IsActive property, if present
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeon committed Oct 27, 2017
1 parent 6b170ac commit 487ad36
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Index.json.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ Describe "Index.json" -Tag $location {
$path = Join-Path $pwd $name
$path | Should Exist
}

It "Pack $name has valid IsActive" {
$isActive = $pack.IsActive

# Treat as true if not specified, as the catalog does
if (($pack.PSObject.Properties | Select-Object -ExpandProperty Name) -notcontains 'IsActive') {
$isActive = $true
}

$isActive | Should BeOfType System.Boolean
}
}
}
}

0 comments on commit 487ad36

Please sign in to comment.