# 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
# frozen_string_literal: true

require 'kreuzberg'
require 'json'
require 'spec_helper'

RSpec.describe 'mime_utilities' do
  it 'mime_detect_bytes: Detect MIME type from file bytes' do
    content = File.read("pdf/fake_memo.pdf").bytes
    result = Kreuzberg.detect_mime_type_from_bytes(content)
    expect(result).to include('pdf')

  end

  it 'mime_detect_image: Detect MIME type from PNG image bytes' do
    content = File.read("images/test_hello_world.png").bytes
    result = Kreuzberg.detect_mime_type_from_bytes(content)
    expect(result).to include('png')

  end

  it 'mime_get_extensions: Get file extensions for a MIME type' do
    result = Kreuzberg.get_extensions_for_mime('application/pdf')
    expect(result).to include('pdf')

  end
end
