Skip to content

Commit

Permalink
PowerShell 7:
Browse files Browse the repository at this point in the history
Test 1 ExpectedErrorMessage Fix.
Tests PSCustomObject.Count -eq 1 Fix.
Join-Object SubGroups [EmptyPartition`1] Fix.
  • Loading branch information
ili101 authored Aug 6, 2019
1 parent 70e90fd commit 02b2d26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Join-Object.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ function Join-Object
}
if ($MultiMode -eq 'SubGroups')
{
$Query[$Side + 'Enumerable'] = {$_Side_Lines = $_Side_Line}
$Query[$Side + 'Enumerable'] = {$_Side_Lines = if ($_Side_Line.Count) {$_Side_Line}}
$Query[$Side] = if ($Object -is [Data.DataTable])
{
$Query['SideSubGroup'].Replace('_DataTable_', $QueryParts['DataTableFromDataTable']).Replace('_PSCustomObject_', $QueryParts['PSCustomObjectFromAny'])
Expand Down
4 changes: 2 additions & 2 deletions Tests/Join-Object.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Describe -Name 'Join-Object' -Fixture {
Format-Test @{
Description = 'Default Error'
ExpectedErrorOn = 'Test'
ExpectedErrorMessage = "but some values were missing: 'PSObject{ID=3; R_IntT=; R_Name=X; Subscription=S3}"
ExpectedErrorMessage = "Object{ID=3; R_IntT=; R_Name=X; Subscription=S3}'."
Params = @{
Left = 'PSCustomObject'
Right = 'DataTable'
Expand Down Expand Up @@ -969,7 +969,7 @@ Describe -Name 'Join-Object' -Fixture {
}
else
{
if ($JoinedOutput.Count -gt 0)
if ($JoinedOutput.Count -gt 1)
{
Should -BeOfType -ActualValue $JoinedOutput -ExpectedType 'System.Array'
}
Expand Down

0 comments on commit 02b2d26

Please sign in to comment.