diff --git a/config/blocklist.yaml b/config/blocklist.yaml index 398064d..fb91bd9 100644 --- a/config/blocklist.yaml +++ b/config/blocklist.yaml @@ -3,7 +3,8 @@ # Company name blocklist — partial case-insensitive match on the company field. # e.g. "Amazon" blocks any listing where company contains "amazon". -companies: [] +companies: + - jobgether # Industry/content blocklist — blocked if company name OR job description contains any keyword. # Use this for industries you will never work in regardless of company. diff --git a/tests/test_discover.py b/tests/test_discover.py index 4cc0fee..4a62916 100644 --- a/tests/test_discover.py +++ b/tests/test_discover.py @@ -183,3 +183,14 @@ def test_discover_custom_board_deduplicates(tmp_path): assert count == 0 # duplicate skipped assert len(get_jobs_by_status(db_path, "pending")) == 1 + + +# ── Blocklist integration ───────────────────────────────────────────────────── + +def test_is_blocklisted_jobgether(): + """_is_blocklisted filters jobs from Jobgether (case-insensitive).""" + from scripts.discover import _is_blocklisted + blocklist = {"companies": ["jobgether"], "industries": [], "locations": []} + assert _is_blocklisted({"company": "Jobgether", "location": "", "description": ""}, blocklist) + assert _is_blocklisted({"company": "jobgether inc", "location": "", "description": ""}, blocklist) + assert not _is_blocklisted({"company": "Acme Corp", "location": "", "description": ""}, blocklist)