Skip to content

Commit 70b24f6

Browse files
author
Daniil Fedotov
committed
Handle multiple expected HTTP codes as one_of when testing management API
1 parent d8ec833 commit 70b24f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rabbit_mgmt_test_util.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ assert_code({group, '4xx'} = CodeExp, CodeAct, Type, Path, Body) ->
206206
_ -> error({expected, CodeExp, got, CodeAct, type, Type,
207207
path, Path, body, Body})
208208
end;
209+
assert_code(CodeExp, CodeAct, Type, Path, Body) when is_list(CodeExp) ->
210+
assert_code({one_of, CodeExp}, CodeAct, Type, Path, Body);
209211
assert_code(CodeExp, CodeAct, Type, Path, Body) ->
210212
case CodeExp of
211213
CodeAct -> ok;

0 commit comments

Comments
 (0)