Skip to content

Commit

Permalink
Merge pull request #65 from puzza007/options-test
Browse files Browse the repository at this point in the history
Basic options test
  • Loading branch information
puzza007 committed Aug 7, 2017
2 parents 8a4dcd3 + 811beb1 commit a1eef11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/katipo_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ groups() ->
patch_data,
patch_arity_2,
patch_qs,
options,
headers,
header_remove,
delete,
Expand Down Expand Up @@ -247,6 +248,11 @@ patch_qs(_) ->
Json = jsx:decode(Body),
[] = [{<<"baz">>,<<>>},{<<"foo">>,<<"bar">>}] -- proplists:get_value(<<"form">>, Json).

options(_) ->
{ok, #{status := 200, headers := Headers}} = katipo:options(?POOL, <<"http://httpbin.org">>),
<<"GET, POST, PUT, DELETE, PATCH, OPTIONS">> =
proplists:get_value(<<"Access-Control-Allow-Methods">>, Headers).

delete(_) ->
{ok, #{status := 200}} = katipo:delete(?POOL, <<"http://httpbin.org/delete">>).

Expand Down

0 comments on commit a1eef11

Please sign in to comment.