Skip to content

Commit

Permalink
fix: tests & credo
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaAK committed Aug 22, 2024
1 parent 72b79f4 commit b53e356
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/request_cache/plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ defmodule RequestCache.Plug do

Logger.error(
"[RequestCache.Plug] recieved an error from #{inspect(request_cache_module(conn, opts))}",
# credo:disable-for-next-line
[crash_reason: {error, stacktrace}]
)
end
Expand Down
6 changes: 4 additions & 2 deletions test/request_cache_plug_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ defmodule RequestCachePlugTest do
assert expected_cached_headers === [
{"cache-control", "max-age=0, private, must-revalidate"},
{"content-type", "text/html; charset=utf-8"},
{"rc-cache-status", "HIT"}
{"rc-cache-status", "HIT"},
{"rc-cache-key", "/my_route/cache:D41D8CD98F00B204E9800998ECF8427E"}
]
end

Expand All @@ -297,7 +298,8 @@ defmodule RequestCachePlugTest do
assert expected_cached_headers === [
{"cache-control", "max-age=0, private, must-revalidate"},
{"content-type", "text/html; charset=utf-8"},
{"rc-cache-status", "HIT"}
{"rc-cache-status", "HIT"},
{"rc-cache-key", "/error-route/all-errors-enabled:D41D8CD98F00B204E9800998ECF8427E"}
]
end
end

0 comments on commit b53e356

Please sign in to comment.