# 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: detection
defmodule E2e.DetectionTest do
  use ExUnit.Case, async: false

  describe "detect_mime_bytes_html" do
    test "detect_mime_bytes_html" do
      content = File.read!("../../test_documents/html/html.html")
      {:ok, result} = Kreuzberg.detect_mime_type_from_bytes(content)
    end
  end

  describe "detect_mime_bytes_pdf" do
    test "detect_mime_bytes_pdf" do
      content = File.read!("../../test_documents/pdf/fake_memo.pdf")
      {:ok, result} = Kreuzberg.detect_mime_type_from_bytes(content)
    end
  end

  describe "detect_mime_bytes_png" do
    test "detect_mime_bytes_png" do
      content = File.read!("../../test_documents/images/test_hello_world.png")
      {:ok, result} = Kreuzberg.detect_mime_type_from_bytes(content)
    end
  end

  describe "get_extensions_unknown_mime" do
    test "get_extensions_unknown_mime" do
      assert {:error, _} = Kreuzberg.get_extensions_for_mime("application/x-totally-unknown")
    end
  end
end
