Skip to content

Commit

Permalink
Add one more test for mochiweb_request:accepted_content_types/1
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmanana committed Jun 21, 2011
1 parent 68fd47d commit a2e3bb5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mochiweb_request_tests.erl
Expand Up @@ -141,6 +141,11 @@ accepted_content_types_test() ->
Req8 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1}, Req8 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
mochiweb_headers:make([{"Accept", "text/html"}])), mochiweb_headers:make([{"Accept", "text/html"}])),
?assertEqual([], ?assertEqual([],
Req8:accepted_content_types(["application/json"])). Req8:accepted_content_types(["application/json"])),

Req9 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
mochiweb_headers:make([{"Accept", "text/*;q=0.9, text/html;q=0.5, */*;q=0.7"}])),
?assertEqual(["application/json", "text/html"],
Req9:accepted_content_types(["text/html", "application/json"])).


-endif. -endif.

0 comments on commit a2e3bb5

Please sign in to comment.