+61
-4
lines changedFilter options
+61
-4
lines changed Original file line number Diff line number Diff line change
@@ -2543,6 +2543,7 @@ filter Disable-GitHubRepositoryVulnerabilityAlert
2543
2543
Position = 1,
2544
2544
ValueFromPipelineByPropertyName,
2545
2545
ParameterSetName='Uri')]
2546
+
[Alias('RepositoryUrl')]
2546
2547
[string] $Uri,
2547
2548
2548
2549
[string] $AccessToken,
@@ -2662,6 +2663,7 @@ filter Enable-GitHubRepositorySecurityFix
2662
2663
Position = 1,
2663
2664
ValueFromPipelineByPropertyName,
2664
2665
ParameterSetName='Uri')]
2666
+
[Alias('RepositoryUrl')]
2665
2667
[string] $Uri,
2666
2668
2667
2669
[string] $AccessToken,
@@ -2780,6 +2782,7 @@ filter Disable-GitHubRepositorySecurityFix
2780
2782
Position = 1,
2781
2783
ValueFromPipelineByPropertyName,
2782
2784
ParameterSetName='Uri')]
2785
+
[Alias('RepositoryUrl')]
2783
2786
[string] $Uri,
2784
2787
2785
2788
[string] $AccessToken,
Original file line number Diff line number Diff line change
@@ -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
}
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4