# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
# E2e tests for category: pdf
defmodule E2e.PdfTest do
  use ExUnit.Case, async: false

  describe "render_pdf_page_first" do
    test "render_pdf_page_first" do
      pdf_bytes = File.read!("../../test_documents/pdf/fake_memo.pdf")
      {:ok, result} = Kreuzberg.render_pdf_page_to_png(pdf_bytes, 0)
      assert (is_binary(result) && byte_size(result) >= 100) || (is_list(result) && length(result) >= 100) || (is_binary(result) == false && is_list(result) == false && String.length(result) >= 100)
    end
  end

  describe "render_pdf_page_out_of_range" do
    test "render_pdf_page_out_of_range" do
      pdf_bytes = File.read!("../../test_documents/pdf/fake_memo.pdf")
      assert {:error, _} = Kreuzberg.render_pdf_page_to_png(pdf_bytes, 999)
    end
  end
end
