"""FC-2d-iii: scan no longer filters to media-only."""

import pytest

pytestmark = pytest.mark.integration


def test_scan_includes_non_media(tmp_path):
    from backend.app.tasks import scan as scan_mod

    root = tmp_path / "imp"
    (root / "Alice").mkdir(parents=True)
    (root / "Alice" / "pic.jpg").write_bytes(b"x")
    (root / "Alice" / "pack.zip").write_bytes(b"x")
    (root / "Alice" / "doc.pdf").write_bytes(b"x")
    (root / "Alice" / "meta.json").write_text("{}")
    (root / "Alice" / ".hidden").write_text("x")

    seen = sorted(p.name for p in scan_mod._iter_import_files(root))
    assert seen == ["doc.pdf", "pack.zip", "pic.jpg"]  # no json/dotfile
