Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions lib/http_ex/backend/mock.ex
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,27 @@ defmodule HTTPEx.Backend.Mock do
end
end

@allwed_expect_request_options [
@allowed_expect_request_options [
:body,
:body_format,
:calls,
:description,
:endpoint,
:expect_body,
:expect_body_format,
:expect_headers,
:expect_path,
:expect_query,
:headers,
:host,
:endpoint,
:min_calls,
:max_calls,
:method,
:min_calls,
:path,
:port,
:query,
:response
:response,
:stacktrace
]

@doc """
Expand Down Expand Up @@ -520,8 +521,8 @@ defmodule HTTPEx.Backend.Mock do
defp validate_options(options) do
option_keys = Keyword.keys(options)

if option_keys -- @allwed_expect_request_options != [] do
disallowed_options = option_keys -- @allwed_expect_request_options
if option_keys -- @allowed_expect_request_options != [] do
disallowed_options = option_keys -- @allowed_expect_request_options

raise ArgumentError,
"The option(s) '#{disallowed_options |> Enum.join(", ")}' are not allowed"
Expand Down
Loading