Skip to content

Commit ca41d9e

Browse files
authored
Merge pull request #70 from webmd-health-services/update-connect-rivetsession
Fixed: Connect-RivetSession no longer returns errant boolean values.
2 parents 814a0ab + 45fd463 commit ca41d9e

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33

44
# Rivet Changelog
55

6+
## 0.21.1
7+
8+
> Released 24 May 2023
9+
10+
### Fixed
11+
12+
* Fixed: `Connect-RivetSession` no longer returns errant boolean values.
13+
14+
615
## 0.21.0
716

817
> Released 24 May 2023

Rivet/Functions/Connect-RivetSession.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ function Connect-RivetSession
2828

2929
foreach ($db in $databasesToConnect)
3030
{
31-
Connect-Database -Session $Session -Name $db
31+
Connect-Database -Session $Session -Name $db | Out-Null
3232
}
3333
}

Rivet/Rivet.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
RootModule = 'Rivet.psm1'
1212

1313
# Version number of this module.
14-
ModuleVersion = '0.21.0'
14+
ModuleVersion = '0.21.1'
1515

1616
# ID used to uniquely identify this module
1717
GUID = '8af34b47-259b-4630-a945-75d38c33b94d'

Test/Connect-RivetSession.Tests.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,17 @@ Describe 'Connect-RivetSession' {
5454

5555
ThenNoErrors
5656
}
57+
58+
It 'should return null after successfully connecting to a database' {
59+
Start-RivetTest -PhysicalDatabase @($RTDatabaseName, $RTDatabase2Name)
60+
$RTSession.Connection.Database | Should -Be $RTDatabaseName
61+
$RTSession.CurrentDatabase.Name | Should -Be $RTDatabaseName
62+
63+
$result = WhenConnectingRivet -Database $RTDatabase2Name
64+
$RTSession.Connection.Database | Should -Be $RTDatabase2Name
65+
$RTSession.CurrentDatabase.Name | Should -Be $RTDatabase2Name
66+
67+
$result | Should -BeNullOrEmpty
68+
ThenNoErrors
69+
}
5770
}

0 commit comments

Comments
 (0)