@@ -83,43 +83,6 @@ AfterAll {
8383 Get-Module - Name ' CommonTestHelper' - All | Remove-Module - Force
8484}
8585
86- Describe ' SqlServerDsc.Common\Format-Path' - Tag ' FormatPath' {
87- BeforeAll {
88- $mockCorrectPath = ' C:\Correct\Path'
89- $mockPathWithTrailingBackslash = ' C:\Correct\Path\'
90- $mockPathWithOnlyQualifier = ' M:'
91- $mockCorrectQualifierPath = ' M:\'
92- }
93-
94- Context ' When there is a path that is wrongly formatted, but now formatting was requested' {
95- It ' Should return the same wrongly formatted path' {
96- $result = Format-Path - Path $mockPathWithTrailingBackslash
97- $result | Should - BeExactly $mockPathWithTrailingBackslash
98- }
99- }
100-
101- Context ' When there is a path that is formatted correctly, and using TrailingSlash' {
102- It ' Should return the same path' {
103- $result = Format-Path - Path $mockCorrectPath - TrailingSlash
104- $result | Should - BeExactly $mockCorrectPath
105- }
106- }
107-
108- Context ' When there is a path that has a trailing backslash, and using TrailingSlash' {
109- It ' Should return the path without trailing backslash' {
110- $result = Format-Path - Path $mockPathWithTrailingBackslash - TrailingSlash
111- $result | Should - BeExactly $mockCorrectPath
112- }
113- }
114-
115- Context ' When there is a path that has only a qualifier, and using TrailingSlash' {
116- It ' Should return the path with trailing backslash after the qualifier' {
117- $result = Format-Path - Path $mockPathWithOnlyQualifier - TrailingSlash
118- $result | Should - BeExactly $mockCorrectQualifierPath
119- }
120- }
121- }
122-
12386# Tests only the parts of the code that does not already get tested thru the other tests.
12487Describe ' SqlServerDsc.Common\Copy-ItemWithRobocopy' - Tag ' CopyItemWithRobocopy' {
12588 BeforeAll {
0 commit comments