mirror of
https://github.com/ClaperCo/Claper.git
synced 2026-08-29 10:09:08 +02:00
Fix tests
This commit is contained in:
@@ -567,6 +567,7 @@ defmodule ClaperWeb.CoreComponents do
|
||||
Flop.Phoenix.build_path(path, %{meta | flop: %{meta.flop | page: page}})
|
||||
end
|
||||
|
||||
defp page_range(_current, total) when total < 1, do: []
|
||||
defp page_range(_current, total) when total <= 5, do: 1..total
|
||||
|
||||
defp page_range(current, total) do
|
||||
|
||||
@@ -125,7 +125,11 @@ defmodule ClaperWeb.EventLiveTest do
|
||||
|
||||
upload =
|
||||
file_input(new_live, "#file-form", :presentation_file, [
|
||||
%{name: "slides.pdf", content: "%PDF-1.4", type: "application/pdf"}
|
||||
%{
|
||||
name: "slides.pdf",
|
||||
content: "%PDF-" <> String.duplicate("0", 95),
|
||||
type: "application/pdf"
|
||||
}
|
||||
])
|
||||
|
||||
assert render_upload(upload, "slides.pdf", 1) =~ "Uploading... 1%"
|
||||
|
||||
Reference in New Issue
Block a user