There was an error while loading. Please reload this page.
1 parent 9551367 commit 3516049Copy full SHA for 3516049
1 file changed
Servers101.tests.ps1
@@ -0,0 +1,28 @@
1
+<#
2
+.SYNOPSIS
3
+ Servers 101 Tests
4
+.DESCRIPTION
5
+ Tests for the Server 101 module.
6
+#>
7
+
8
+$scriptName = $MyInvocation.MyCommand.Name
9
+$scriptFileContent = Get-Content -Raw $MyInvocation.MyCommand.ScriptBlock.File
10
11
+describe Servers101 {
12
+ it 'Gets a list of demo servers' {
13
+ Servers101
14
+ }
15
16
+ it 'Can get a specific demo server' {
17
+ Servers101 -Name Server101
18
19
20
+ it 'Has a working file server' {
21
+ $job = . (Servers101 -Name Server101) -RootDirectory $pwd
22
+ Write-Warning "$($job.Url)$($scriptName)"
23
+ $myResponse = Invoke-RestMethod -Uri "$($job.Url)$($scriptName)"
24
+ "$myResponse".Trim() | Should -Be "$scriptFileContent".Trim()
25
+ $job.HttpListener.Stop()
26
27
28
+}
0 commit comments