Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmj committed May 7, 2024
1 parent a1c7ec5 commit 0dc6c70
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/preview/queue.ex
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ defmodule Preview.Queue do
|> Enum.uniq_by(fn {path, _blob} -> path end)
|> Enum.sort()


update_package_sitemap(package, files)
Logger.info("#{key}: done")

Expand Down
4 changes: 3 additions & 1 deletion lib/preview_web/live/preview_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ defmodule PreviewWeb.PreviewLive do
end
end

@default_file_priority ["mix.exs", "rebar.config", "Makefile"] |> Enum.with_index(2) |> Map.new()
@default_file_priority ["mix.exs", "rebar.config", "Makefile"]
|> Enum.with_index(2)
|> Map.new()

defp default_file_priority(file) do
if file |> String.downcase() |> String.starts_with?("readme") do
Expand Down
2 changes: 1 addition & 1 deletion test/preview/queue_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ defmodule Preview.QueueTest do
ref = Broadway.test_message(Preview.Queue, put_message(key))
assert_receive {:ack, ^ref, [_], []}, 1000

assert Bucket.get_file_list(package, "1.0.0") == ["lib/foo.exs", "file"]
assert Bucket.get_file_list(package, "1.0.0") == ["file", "lib/foo.exs"]
assert Bucket.get_file(package, "1.0.0", "lib/foo.exs") == "Foo"
assert Bucket.get_file(package, "1.0.0", "file") == "file"
end
Expand Down

0 comments on commit 0dc6c70

Please sign in to comment.