summaryrefslogtreecommitdiff
path: root/test/rebar_utils_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/rebar_utils_SUITE.erl')
-rw-r--r--test/rebar_utils_SUITE.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/rebar_utils_SUITE.erl b/test/rebar_utils_SUITE.erl
index 233fcff..4901f40 100644
--- a/test/rebar_utils_SUITE.erl
+++ b/test/rebar_utils_SUITE.erl
@@ -33,7 +33,8 @@
sh_does_not_miss_messages/1,
tup_merge/1,
proxy_auth/1,
- is_list_of_strings/1]).
+ is_list_of_strings/1,
+ url_append_path/1]).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
@@ -49,7 +50,7 @@ all() ->
[{group, args_to_tasks},
sh_does_not_miss_messages,
tup_merge,
- proxy_auth, is_list_of_strings].
+ proxy_auth, is_list_of_strings, url_append_path].
groups() ->
[{args_to_tasks, [], [empty_arglist,
@@ -319,3 +320,8 @@ is_list_of_strings(_Config) ->
?assert(rebar_utils:is_list_of_strings([])),
?assert(rebar_utils:is_list_of_strings("")),
?assert(rebar_utils:is_list_of_strings("foo") == false).
+
+url_append_path(_Config) ->
+ ?assertEqual({ok, "https://repo.hex.pm:443/repos/org"}, rebar_utils:url_append_path("https://repo.hex.pm", "/repos/org")),
+ ?assertEqual({ok, "https://repo.hex.pm:443/repos/org?foo=bar"}, rebar_utils:url_append_path("https://repo.hex.pm",
+ "/repos/org?foo=bar")).