diff --git a/etl/hubspot/tests/test_hubspot_deal_differ.py b/etl/hubspot/tests/test_hubspot_deal_differ.py index 5e9bcfdfa..12cb39425 100644 --- a/etl/hubspot/tests/test_hubspot_deal_differ.py +++ b/etl/hubspot/tests/test_hubspot_deal_differ.py @@ -453,6 +453,35 @@ def test_abri_job_logging__project_code_cased_differently__returns_true() -> Non assert result is True +def test_abri_job_logging__real_portal_project_code__returns_true() -> None: + # The code carried by every Abri stock-condition deal in the portal + # (verified 2026-07-07); these deals have no project association, so the + # project_code fallback is the branch that must fire in production. + deal_id = uuid.uuid4() + + # Arrange + old_deal = make_old_deal( + id=deal_id, + project_code="[Abri Stock Condition - Privately Funded - 062026 - 1247536318670]", + confirmed_survey_date=None, + ) + new_deal = make_new_deal( + deal_id, + project_code="[Abri Stock Condition - Privately Funded - 062026 - 1247536318670]", + confirmed_survey_date="2026-07-15", + ) + + # Act + result = HubspotDealDiffer.check_for_abri_job_logging( + new_deal=new_deal, + new_project=None, + old_deal=old_deal, + ) + + # Assert + assert result is True + + @pytest.mark.parametrize( "new_overrides", [