Skip to content

Commit

Permalink
xWebAdministration: Minor typo updates (dsccommunity#388)
Browse files Browse the repository at this point in the history
- Update section header for WebApplicationHandler in README.
- Fix tests for helper function `Get-LocalizedData` in Helper.Tests.ps1
  that referenced the wrong path.
  • Loading branch information
johlju authored and Gregory Storme committed Feb 14, 2020
1 parent 11952da commit e2d8610
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Please check out common DSC Resources [contributing guidelines](https://github.c
* **SslFlags**: SslFlags for the application: The acceptable values for this property are: `''`, `Ssl`, `SslNegotiateCert`, `SslRequireCert`, `Ssl128`
* **EnabledProtocols**: EnabledProtocols for the application. The acceptable values for this property are: `http`, `https`, `net.tcp`, `net.msmq`, `net.pipe`

#### WebApplicationHandler
### WebApplicationHandler

* **[String] Ensure** _(Write)_: Indicates if the application handler exists. Set this property to `Absent` to ensure that the application handler does not exist. Default value is 'Present'.
{ *Present* | Absent }
Expand Down Expand Up @@ -405,6 +405,11 @@ This resource manages the IIS configuration section locking (overrideMode) to co
=======
=======

* Changes to xWebAdministration
* Update section header for WebApplicationHandler in README.
* Fix tests for helper function `Get-LocalizedData` in Helper.Tests.ps1
that referenced the wrong path.

### 2.1.0.0

* Added new resources **xWebConfigProperty** and **xWebConfigPropertyCollection** extending functionality provided by **xWebConfigKeyValue**, addresses #249.
Expand Down
6 changes: 3 additions & 3 deletions Tests/Unit/Helper.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -496,18 +496,18 @@ try
return 'en-US'
} -Verifiable

{ Get-LocalizedData -ResourceName 'DummyResource' -ResourcePath ..\..\DSCResources\MSFT_xWebApplicationHandler\en-us\MSFT_xWebApplicationHandler.strings.psd1} | Should Not Throw
{ Get-LocalizedData -ResourceName 'DummyResource' -ResourcePath '..\..\DSCResources\MSFT_WebApplicationHandler\en-us\MSFT_WebApplicationHandler.strings.psd1'} | Should Not Throw
}

It 'Should call Get-LocalizedData and fallback to en-US if input language does not exist' {

Mock -CommandName Test-Path -MockWith {$false} -Verifiable
Mock -CommandName Join-Path -MockWith {
'..\..\DSCResources\MSFT_xWebApplicationHandler\en-us\Dummy.strings.psd1\DummyPath'
'..\..\DSCResources\MSFT_WebApplicationHandler\en-us\Dummy.strings.psd1'
} -Verifiable
Mock -CommandName Import-LocalizedData -Verifiable

{ Get-LocalizedData -ResourceName 'DummyResource' -ResourcePath ..\..\DSCResources\MSFT_xWebApplicationHandler\en-us\Dummy.strings.psd1} | Should -Not -Throw
{ Get-LocalizedData -ResourceName 'DummyResource' -ResourcePath '..\..\DSCResources\MSFT_WebApplicationHandler\en-us\Dummy.strings.psd1' } | Should -Not -Throw

Assert-MockCalled -CommandName Join-Path -Exactly -Times 2 -Scope It
Assert-MockCalled -CommandName Test-Path -Exactly -Times 1 -Scope It
Expand Down

0 comments on commit e2d8610

Please sign in to comment.