@@ -181,7 +181,7 @@ add_specs suite_builder =
181
181
182
182
group_builder.specify "Fails on a bad URL scheme" <|
183
183
Data.fetch "zxcv://bad.scheme" . should_fail_with Illegal_Argument
184
- Data.fetch "" . should_fail_with Illegal_Argument
184
+ Data.fetch "" . should_fail_with Syntax_Error
185
185
186
186
group_builder.specify "can select the version" <| Test.with_retries <|
187
187
req = Request.get url_get
@@ -578,30 +578,30 @@ add_specs suite_builder =
578
578
suite_builder.group "Header resolution" group_builder->
579
579
group_builder.specify "Default content type and encoding" <|
580
580
expected = [Header.content_type "text/plain; charset=UTF-8"]
581
- _resolve_headers (Request.new HTTP_Method.Get "" [] (Request_Body.Text "")) . should_equal_ignoring_order expected
581
+ _resolve_headers (Request.new HTTP_Method.Get "www.enso.org " [] (Request_Body.Text "")) . should_equal_ignoring_order expected
582
582
583
583
group_builder.specify "Content type specified in body" <|
584
584
expected = [Header.content_type "application/json; charset=UTF-8"]
585
- _resolve_headers (Request.new HTTP_Method.Get "" [] (Request_Body.Text "" content_type="application/json")) . should_equal_ignoring_order expected
585
+ _resolve_headers (Request.new HTTP_Method.Get "www.enso.org " [] (Request_Body.Text "" content_type="application/json")) . should_equal_ignoring_order expected
586
586
587
587
group_builder.specify "Content type specified in header list" <|
588
588
expected = [Header.content_type "application/json"]
589
- _resolve_headers (Request.new HTTP_Method.Get "" [Header.content_type "application/json"] (Request_Body.Text "")) . should_equal_ignoring_order expected
589
+ _resolve_headers (Request.new HTTP_Method.Get "www.enso.org " [Header.content_type "application/json"] (Request_Body.Text "")) . should_equal_ignoring_order expected
590
590
591
591
group_builder.specify "Text encoding specified in body" <|
592
592
expected = [Header.content_type "text/plain; charset=UTF-16LE"]
593
- _resolve_headers (Request.new HTTP_Method.Get "" [] (Request_Body.Text "" encoding=Encoding.utf_16_le)) . should_equal_ignoring_order expected
593
+ _resolve_headers (Request.new HTTP_Method.Get "www.enso.org " [] (Request_Body.Text "" encoding=Encoding.utf_16_le)) . should_equal_ignoring_order expected
594
594
595
595
group_builder.specify "Can't specify content type in both places" <|
596
- _resolve_headers (Request.new HTTP_Method.Get "" [Header.content_type "application/json"] (Request_Body.Text "" content_type="text/plain")) . should_fail_with Illegal_Argument
596
+ _resolve_headers (Request.new HTTP_Method.Get "www.enso.org " [Header.content_type "application/json"] (Request_Body.Text "" content_type="text/plain")) . should_fail_with Illegal_Argument
597
597
598
598
group_builder.specify "Custom header" <|
599
599
expected = [Header.new "some" "header", Header.content_type "application/json; charset=UTF-8"]
600
- _resolve_headers (Request.new HTTP_Method.Get "" [Header.new "some" "header"] (Request_Body.Text "" content_type="application/json")) . should_equal_ignoring_order expected
600
+ _resolve_headers (Request.new HTTP_Method.Get "www.enso.org " [Header.new "some" "header"] (Request_Body.Text "" content_type="application/json")) . should_equal_ignoring_order expected
601
601
602
602
group_builder.specify "Multiple content types in header list are ok" <|
603
603
expected = [Header.content_type "application/json", Header.content_type "text/plain"]
604
- _resolve_headers (Request.new HTTP_Method.Get "" [Header.content_type "application/json", Header.content_type "text/plain"] (Request_Body.Text "")) . should_equal_ignoring_order expected
604
+ _resolve_headers (Request.new HTTP_Method.Get "www.enso.org " [Header.content_type "application/json", Header.content_type "text/plain"] (Request_Body.Text "")) . should_equal_ignoring_order expected
605
605
606
606
suite_builder.group "Http Error handling" group_builder->
607
607
group_builder.specify "should be able to handle request errors" <|
0 commit comments