@@ -24,7 +24,7 @@ open Suave.Testing
2424
2525open Fuchu
2626
27- let run_with ' = run _ with default _ config
27+ let runWithDefaultConfig = runWith defaultConfig
2828
2929let creds_inner id =
3030 { id = id
@@ -51,7 +51,7 @@ let making_request =
5151 ( fun ( attr , creds , user ) -> OK ( sprintf " authenticated user '%s '" user.real_ name))
5252
5353 let req m data f_req f_resp =
54- req _ resp m " /" " " data None System.Net.DecompressionMethods.None f_ req f_ resp
54+ reqResp m " /" " " data None System.Net.DecompressionMethods.None f_ req f_ resp
5555
5656 let ensure_auth_header = function
5757 | Choice1Of2 res -> res
@@ -68,7 +68,7 @@ let making_request =
6868
6969 testList " authentication cases" [
7070 testCase " when not signing request" <| fun _ ->
71- run _ with' sample_ app |> req HttpMethod.GET None id ( fun resp ->
71+ runWithDefaultConfig sample_ app |> req HttpMethod.GET None id ( fun resp ->
7272 Assert.Equal( " unauthorised" , HttpStatusCode.Unauthorized, resp.StatusCode)
7373 let res_str = resp.Content.ReadAsStringAsync() .Result
7474 Assert.StringContains( " body" , " Missing header 'authorization'" , res_ str)
@@ -77,7 +77,7 @@ let making_request =
7777 testCase " when signing GET request" <| fun _ ->
7878 let opts = ClientOptions.mk' ( creds_ inner " 1" )
7979 let request = set_ auth_ header HM.GET opts
80- run _ with' sample_ app |> req HttpMethod.GET None request ( fun resp ->
80+ runWithDefaultConfig sample_ app |> req HttpMethod.GET None request ( fun resp ->
8181 Assert.StringContains( " successful auth" , " authenticated user" , resp.Content.ReadAsStringAsync() .Result)
8282 Assert.Equal( " OK" , HttpStatusCode.OK, resp.StatusCode)
8383 )
@@ -87,7 +87,7 @@ let making_request =
8787 let request =
8888 set_ auth_ header HM.POST opts
8989 >> set_ bytes [| 0 uy; 1 uy |]
90- run _ with' sample_ app |> req HttpMethod.POST None request ( fun resp ->
90+ runWithDefaultConfig sample_ app |> req HttpMethod.POST None request ( fun resp ->
9191 Assert.StringContains( " successful auth" , " authenticated user" , resp.Content.ReadAsStringAsync() .Result)
9292 Assert.Equal( " OK" , HttpStatusCode.OK, resp.StatusCode)
9393 )
0 commit comments