aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/world/net/http/response.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/world/net/http/response.lux')
-rw-r--r--stdlib/source/test/lux/world/net/http/response.lux23
1 files changed, 12 insertions, 11 deletions
diff --git a/stdlib/source/test/lux/world/net/http/response.lux b/stdlib/source/test/lux/world/net/http/response.lux
index 28d726a1f..bdefd87c2 100644
--- a/stdlib/source/test/lux/world/net/http/response.lux
+++ b/stdlib/source/test/lux/world/net/http/response.lux
@@ -65,7 +65,8 @@
.let [expected_css (css.rule selector.any
(list [property.text_color
(value.rgb color)]))]])
- (_.for [/.Response])
+ (_.for [/.Response
+ /.#message /.#status])
(`` (all _.and
(,, (with_template [<coverage> <response>
<status>
@@ -84,14 +85,14 @@
(try#each (mime#= <content_type>))
(try.else false)))))]
- [/.empty (/.empty expected_status) expected_status 0 mime.utf_8]
- [/.not_found /.not_found status.not_found 0 mime.utf_8]
- [/.content (/.content expected_status expected_mime utf8_data) expected_status utf8_length expected_mime]
- [/.bad_request (/.bad_request utf8) status.bad_request utf8_length mime.utf_8]
- [/.ok (/.ok expected_mime utf8_data) status.ok utf8_length expected_mime]
+ [/.empty (/.empty async.monad expected_status) expected_status 0 mime.utf_8]
+ [/.not_found (/.not_found async.monad) status.not_found 0 mime.utf_8]
+ [/.content (/.content async.monad expected_status expected_mime utf8_data) expected_status utf8_length expected_mime]
+ [/.bad_request (/.bad_request async.monad utf8) status.bad_request utf8_length mime.utf_8]
+ [/.ok (/.ok async.monad expected_mime utf8_data) status.ok utf8_length expected_mime]
))
(_.coverage [/.temporary_redirect]
- (let [response (/.temporary_redirect expected_url)]
+ (let [response (/.temporary_redirect async.monad expected_url)]
(and (same? status.temporary_redirect (the /.#status response))
(|> response
(the [/.#message //.#headers])
@@ -99,7 +100,7 @@
(try#each (text#= expected_url))
(try.else false)))))
(in (do async.monad
- [.let [response (/.text utf8)]
+ [.let [response (/.text async.monad utf8)]
body ((the [/.#message //.#body] response) {.#None})]
(unit.coverage [/.text]
(and (same? status.ok (the /.#status response))
@@ -118,7 +119,7 @@
(binary#= utf8_data)))
(try.else false))))))
(in (do async.monad
- [.let [response (/.html expected_html)
+ [.let [response (/.html async.monad expected_html)
data (|> expected_html
html.html
utf8#encoded)
@@ -141,7 +142,7 @@
(binary#= data)))
(try.else false))))))
(in (do async.monad
- [.let [response (/.json expected_json)
+ [.let [response (/.json async.monad expected_json)
data (|> expected_json
json#encoded
utf8#encoded)
@@ -164,7 +165,7 @@
(binary#= data)))
(try.else false))))))
(in (do async.monad
- [.let [response (/.css expected_css)
+ [.let [response (/.css async.monad expected_css)
data (|> expected_css
css.css
utf8#encoded)