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

  describe "error_empty_bytes" do
    test "error_empty_bytes" do
      content = File.read!("../../test_documents/text/empty.txt")
      {:ok, result} = Kreuzberg.extract_bytes_sync(content, "text/plain", "{}")
    end
  end

  describe "error_empty_mime" do
    test "error_empty_mime" do
      content = File.read!("../../test_documents/text/plain.txt")
      assert {:error, _} = Kreuzberg.extract_bytes_sync(content, "", "{}")
    end
  end

  describe "error_extract_bytes_conflicting_ocr" do
    test "error_extract_bytes_conflicting_ocr" do
      content = File.read!("../../test_documents/text/fake_text.txt")
      assert {:error, _} = Kreuzberg.extract_bytes_sync(content, "text/plain", "{\"disable_ocr\":true,\"force_ocr\":true}")
    end
  end

  describe "error_invalid_mime_format" do
    test "error_invalid_mime_format" do
      content = File.read!("../../test_documents/text/plain.txt")
      assert {:error, _} = Kreuzberg.extract_bytes_sync(content, "not-a-mime", "{}")
    end
  end

  describe "error_unsupported_mime" do
    test "error_unsupported_mime" do
      content = File.read!("../../test_documents/text/plain.txt")
      assert {:error, _} = Kreuzberg.extract_bytes_sync(content, "application/x-nonexistent", "{}")
    end
  end
end
