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

  describe "mime_detect_bytes" do
    test "mime_detect_bytes" do
      content = File.read!("../../test_documents/pdf/fake_memo.pdf")
      {:ok, result} = Kreuzberg.detect_mime_type_from_bytes(content)
      assert String.contains?(to_string(result), "pdf")
    end
  end

  describe "mime_detect_image" do
    test "mime_detect_image" do
      content = File.read!("../../test_documents/images/test_hello_world.png")
      {:ok, result} = Kreuzberg.detect_mime_type_from_bytes(content)
      assert String.contains?(to_string(result), "png")
    end
  end

  describe "mime_get_extensions" do
    test "mime_get_extensions" do
      {:ok, result} = Kreuzberg.get_extensions_for_mime("application/pdf")
      assert String.contains?(to_string(result), "pdf")
    end
  end
end
