@@ -450,9 +450,7 @@ defmodule BypassTest do
450450 "high-level" HTTP client, since they do connection pooling and we will sometimes get a connection
451451 closed error and not a failed to connect error, when we test Bypass.down
452452 """
453- def request ( port , path \\ "/example_path" , method \\ :post ) do
454- method = method |> Atom . to_string ( ) |> String . upcase ( )
455-
453+ def request ( port , path \\ "/example_path" , method \\ "POST" ) do
456454 with { :ok , conn } <- Mint.HTTP . connect ( :http , "127.0.0.1" , port ) ,
457455 { :ok , conn , ref } = Mint.HTTP . request ( conn , method , path , [ ] , "" ) do
458456 receive_responses ( conn , ref , 100 , [ ] )
@@ -579,7 +577,7 @@ defmodule BypassTest do
579577 # Success
580578 bypass = prepare_stubs ( )
581579 assert { :ok , 200 , "" } = request ( bypass . port )
582- assert { :ok , 200 , "" } = request ( bypass . port , "/foo" , :get )
580+ assert { :ok , 200 , "" } = request ( bypass . port , "/foo" , "GET" )
583581 assert :ok = Bypass . verify_expectations! ( bypass )
584582
585583 # Fail: no requests on a single stub
@@ -598,7 +596,7 @@ defmodule BypassTest do
598596 assert { :ok , 200 , "" } = request ( bypass . port )
599597 end )
600598
601- assert { :ok , 200 , "" } = request ( bypass . port , "/foo" , :get )
599+ assert { :ok , 200 , "" } = request ( bypass . port , "/foo" , "GET" )
602600 :timer . sleep ( 10 )
603601
604602 assert_raise ESpec.AssertionError , "Expected only one HTTP request for Bypass" , fn ->
0 commit comments