# 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

test_that("detect_mime_bytes_html: Detect HTML MIME from bytes", {
  result <- detect_mime_type_from_bytes(content = readBin(.resolve_fixture("html/html.html"), what = "raw", n = file.info(.resolve_fixture("html/html.html"))$size))
  expect_true(TRUE)
})

test_that("detect_mime_bytes_pdf: Detect PDF MIME type from bytes", {
  result <- detect_mime_type_from_bytes(content = readBin(.resolve_fixture("pdf/fake_memo.pdf"), what = "raw", n = file.info(.resolve_fixture("pdf/fake_memo.pdf"))$size))
  expect_true(TRUE)
})

test_that("detect_mime_bytes_png: Detect PNG MIME type from bytes", {
  result <- detect_mime_type_from_bytes(content = readBin(.resolve_fixture("images/test_hello_world.png"), what = "raw", n = file.info(.resolve_fixture("images/test_hello_world.png"))$size))
  expect_true(TRUE)
})

test_that("get_extensions_unknown_mime: get_extensions unknown MIME", {
  expect_error(get_extensions_for_mime(mime_type = "application/x-totally-unknown"))
})
