@@ -1246,6 +1246,16 @@ try
1246
1246
}
1247
1247
}
1248
1248
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
+
1249
1259
AfterAll - ScriptBlock {
1250
1260
Remove-GitHubRepository - Uri $repo.svn_url - Force
1251
1261
}
@@ -1263,6 +1273,17 @@ try
1263
1273
}
1264
1274
}
1265
1275
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
+
1266
1287
AfterAll - ScriptBlock {
1267
1288
Remove-GitHubRepository - Uri $repo.svn_url - Force
1268
1289
}
@@ -1271,12 +1292,23 @@ try
1271
1292
Describe ' GitHubRepositories\Disable-GitHubRepositoryVulnerabilityAlert' {
1272
1293
BeforeAll {
1273
1294
$repo = New-GitHubRepository - RepositoryName ([Guid ]::NewGuid().Guid)
1274
- Enable-GitHubRepositoryVulnerabilityAlert - Uri $repo.svn_url
1295
+ Enable-GitHubRepositoryVulnerabilityAlert - Uri $repo.svn_url
1275
1296
}
1276
1297
1277
1298
Context ' When Disabling GitHub Repository Vulnerability Alerts' {
1278
1299
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 } |
1280
1312
Should -Not - Throw
1281
1313
}
1282
1314
}
@@ -1294,7 +1326,18 @@ try
1294
1326
1295
1327
Context ' When Enabling GitHub Repository Security Fixes' {
1296
1328
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 } |
1298
1341
Should -Not - Throw
1299
1342
}
1300
1343
}
@@ -1313,7 +1356,18 @@ try
1313
1356
1314
1357
Context ' When Disabling GitHub Repository Security Fixes' {
1315
1358
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 } |
1317
1371
Should -Not - Throw
1318
1372
}
1319
1373
}
0 commit comments