Skip to content

Instantly share code, notes, and snippets.

@awaxa
Created January 12, 2015 21:34
Show Gist options
  • Save awaxa/5feebddd7e982d191b29 to your computer and use it in GitHub Desktop.
Save awaxa/5feebddd7e982d191b29 to your computer and use it in GitHub Desktop.
# Pastebin 4KyBQw0L
describe "default recipe" {
it "should expose a nuget packages feed" {
$packages = Invoke-RestMethod -Uri "http://localhost/nuget/Packages"
$packages.Count | should not be 0
$packages[0].Title.InnerText | should be 'elmah'
}
context "firewall" {
$rule = Get-NetFirewallRule | ? { $_.InstanceID -eq 'http' }
$filter = Get-NetFirewallPortFilter | ? { $_.InstanceID -eq 'http' }
it "should filter port 80" {
$filter.LocalPort | should be 80
}
it "should be enabled" {
$rule.Enabled | should be $true
}
it "should allow traffic" {
$rule.Action | should be "Allow"
}
it "should apply to inbound traffic" {
$rule.Direction | should be "Inbound"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment