@@ -1246,6 +1246,16 @@ try
12461246 }
12471247 }
12481248
1249+ Context " When specifiying the 'URI' Parameter from the Pipeline" {
1250+ BeforeAll - ScriptBlock {
1251+ $status = $repo | Test-GitHubRepositoryVulnerabilityAlert
1252+ }
1253+
1254+ It ' Should return an object of the correct type' {
1255+ $status | Should - BeOfType System.Boolean
1256+ }
1257+ }
1258+
12491259 AfterAll - ScriptBlock {
12501260 Remove-GitHubRepository - Uri $repo.svn_url - Force
12511261 }
@@ -1263,6 +1273,17 @@ try
12631273 }
12641274 }
12651275
1276+ Context " When specifiying the 'URI' Parameter from the Pipeline" {
1277+ BeforeAll - ScriptBlock {
1278+ Disable-GitHubRepositoryVulnerabilityAlert - Uri $repo.svn_url
1279+ }
1280+
1281+ It ' Should not throw' {
1282+ { $repo | Enable-GitHubRepositoryVulnerabilityAlert } |
1283+ Should -Not - Throw
1284+ }
1285+ }
1286+
12661287 AfterAll - ScriptBlock {
12671288 Remove-GitHubRepository - Uri $repo.svn_url - Force
12681289 }
@@ -1271,12 +1292,23 @@ try
12711292 Describe ' GitHubRepositories\Disable-GitHubRepositoryVulnerabilityAlert' {
12721293 BeforeAll {
12731294 $repo = New-GitHubRepository - RepositoryName ([Guid ]::NewGuid().Guid)
1274- Enable-GitHubRepositoryVulnerabilityAlert - Uri $repo.svn_url
1295+ Enable-GitHubRepositoryVulnerabilityAlert - Uri $repo.svn_url
12751296 }
12761297
12771298 Context ' When Disabling GitHub Repository Vulnerability Alerts' {
12781299 It ' Should not throw' {
1279- { Disable-GitHubRepositoryVulnerabilityAlert - Uri $repo.svn_url } |
1300+ { Disable-GitHubRepositoryVulnerabilityAlert - Uri $repo.svn_url } |
1301+ Should -Not - Throw
1302+ }
1303+ }
1304+
1305+ Context " When specifiying the 'URI' Parameter from the Pipeline" {
1306+ BeforeAll - ScriptBlock {
1307+ Enable-GitHubRepositoryVulnerabilityAlert - Uri $repo.svn_url
1308+ }
1309+
1310+ It ' Should not throw' {
1311+ { $repo | Disable-GitHubRepositoryVulnerabilityAlert } |
12801312 Should -Not - Throw
12811313 }
12821314 }
@@ -1294,7 +1326,18 @@ try
12941326
12951327 Context ' When Enabling GitHub Repository Security Fixes' {
12961328 It ' Should not throw' {
1297- { Enable-GitHubRepositorySecurityFix - Uri $repo.svn_url } |
1329+ { Enable-GitHubRepositorySecurityFix - Uri $repo.svn_url } |
1330+ Should -Not - Throw
1331+ }
1332+ }
1333+
1334+ Context " When specifiying the 'URI' Parameter from the Pipeline" {
1335+ BeforeAll - ScriptBlock {
1336+ Disable-GitHubRepositorySecurityFix - Uri $repo.svn_url
1337+ }
1338+
1339+ It ' Should not throw' {
1340+ { $repo | Enable-GitHubRepositorySecurityFix } |
12981341 Should -Not - Throw
12991342 }
13001343 }
@@ -1313,7 +1356,18 @@ try
13131356
13141357 Context ' When Disabling GitHub Repository Security Fixes' {
13151358 It ' Should not throw' {
1316- { Disable-GitHubRepositorySecurityFix - Uri $repo.svn_url } |
1359+ { Disable-GitHubRepositorySecurityFix - Uri $repo.svn_url } |
1360+ Should -Not - Throw
1361+ }
1362+ }
1363+
1364+ Context " When specifiying the 'URI' Parameter from the Pipeline" {
1365+ BeforeAll - ScriptBlock {
1366+ Enable-GitHubRepositorySecurityFix - Uri $repo.svn_url
1367+ }
1368+
1369+ It ' Should not throw' {
1370+ { $repo | Disable-GitHubRepositorySecurityFix } |
13171371 Should -Not - Throw
13181372 }
13191373 }
0 commit comments