Skip to content

Commit a4cb8f7

Browse files
committed
fix unit test
1 parent 3425f02 commit a4cb8f7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/Dash.NET.Giraffe.Tests/TestUtils.fs

+3-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type DashApp with
7676
clearResponse >=> setStatusCode 500 >=> (config.ErrorHandler ex)
7777

7878
let configureCors (builder : CorsPolicyBuilder) =
79-
builder.WithOrigins(sprintf "http://%s:5001" config.HostName)
79+
builder.WithOrigins(sprintf "http://%s:%d" config.HostName config.Port)
8080
.AllowAnyMethod()
8181
.AllowAnyHeader()
8282
|> ignore
@@ -86,7 +86,6 @@ type DashApp with
8686
(match env.EnvironmentName with
8787
| "Development" -> appBuilder.UseDeveloperExceptionPage()
8888
| _ -> appBuilder.UseGiraffeErrorHandler(errorHandler))
89-
.UseHttpsRedirection()
9089
.UseCors(configureCors)
9190
.UseStaticFiles()
9291
.UseGiraffe(DashApp.toHttpHandler loadedApp)
@@ -136,6 +135,8 @@ let generateLayoutEndpointTest name message expected (layout:DashComponent) =
136135

137136
let testConfig = {
138137
HostName = "localhost"
138+
IpAddress = "127.0.0.1"
139+
Port = 5000
139140
LogLevel = LogLevel.Debug
140141
ErrorHandler = (fun ex -> text ex.Message)
141142
}

0 commit comments

Comments
 (0)