Modified:
branches/RB-0.2/lib/ewgi/test/src/mochiweb_simple_get.erl
branches/RB-0.2/lib/ewgi/test/src/mochiweb_simple_post.erl
Log:
fix tests
Modified: branches/RB-0.2/lib/ewgi/test/src/mochiweb_simple_get.erl
==============================================================================
--- branches/RB-0.2/lib/ewgi/test/src/mochiweb_simple_get.erl (original)
+++ branches/RB-0.2/lib/ewgi/test/src/mochiweb_simple_get.erl Wed Oct 22
14:30:03 2008
@@ -56,8 +56,8 @@
{"if-modified-since", undefined},
{"user-agent", undefined},
{"x-http-method-override", undefined},
- {"te", []},
- {"connection", "keep-alive"}],
+ {"Te", []},
+ {'Connection', "keep-alive"}],
?eq(ewgi_api:get_all_headers(Ctx), Headers),
?eq(ewgi_api:remote_host(Ctx), undefined),
?eq(ewgi_api:remote_addr(Ctx), "127.0.0.1"),
@@ -66,8 +66,8 @@
?eq(ewgi_api:remote_ident(Ctx),undefined),
?eq(ewgi_api:url_scheme(Ctx), "http"),
?eq(ewgi_api:version(Ctx), {1, 0}),
- ?eq(ewgi_api:get_all_data(Ctx), dict:new()),
- {ewgi_context, #ewgi_request{}, #ewgi_response{status=?OK, headers=[],
message_body=?RESPONSE}}.
+ ?eq(ewgi_api:get_all_data(Ctx), gb_trees:empty()),
+ {ewgi_context, Req, #ewgi_response{status=?OK, headers=[],
message_body=?RESPONSE}}.
test_simple_req() ->
{ok, Result} = http:request("http://localhost:8000/"),
Modified: branches/RB-0.2/lib/ewgi/test/src/mochiweb_simple_post.erl
==============================================================================
--- branches/RB-0.2/lib/ewgi/test/src/mochiweb_simple_post.erl (original)
+++ branches/RB-0.2/lib/ewgi/test/src/mochiweb_simple_post.erl Wed Oct 22
14:30:03 2008
@@ -55,8 +55,8 @@
{"if-modified-since", undefined},
{"user-agent", undefined},
{"x-http-method-override", undefined},
- {"te", []},
- {"connection", "keep-alive"}],
+ {"Te", []},
+ {'Connection', "keep-alive"}],
?eq(ewgi_api:get_all_headers(Ctx), Headers),
?eq(ewgi_api:remote_host(Ctx), undefined),
?eq(ewgi_api:remote_addr(Ctx), "127.0.0.1"),
@@ -65,7 +65,7 @@
?eq(ewgi_api:remote_ident(Ctx),undefined),
?eq(ewgi_api:url_scheme(Ctx), "http"),
?eq(ewgi_api:version(Ctx), {1, 0}),
- ?eq(ewgi_api:get_all_data(Ctx), dict:new()),
+ ?eq(ewgi_api:get_all_data(Ctx), gb_trees:empty()),
{ewgi_context, Req, #ewgi_response{status=?OK, headers=[],
message_body=?RESPONSE}}.
test_simple_post() ->