Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Laszlo Jozsef Horvath committed Jan 16, 2019
1 parent bb747fd commit 4d8e832
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cowboy_swagger_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ trails(Options) ->
StaticFiles =
case application:get_env(cowboy_swagger, static_files) of
{ok, Val} -> Val;
_ -> GlobalSpec = application:get_env(cowboy_swagger, global_spec),
_ -> GlobalSpec = application:get_env(cowboy_swagger, global_spec, #{}),
filename:join(cowboy_swagger_priv(), get_swagger_version(GlobalSpec))
end,
Redirect = trails:trail(
Expand Down
2 changes: 1 addition & 1 deletion test/cowboy_swagger_handler_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ handler_test(_Config) ->
#{status_code := 200, body := SwaggerUIBody} =
cowboy_swagger_test_utils:api_call(get, "/api-docs/swagger-ui.js"),
{ok, SwaggerUIBodySrc} =
file:read_file("../../../../priv/swagger/swagger-ui.js"),
file:read_file("../../../../priv/swagger2/swagger-ui.js"),
SwaggerUIBody = SwaggerUIBodySrc,

%% GET unknown-file.ext - test /api-docs/[...] trail
Expand Down

0 comments on commit 4d8e832

Please sign in to comment.