Explicitly test that stats endpoint isn’t called

If we know a service has no jobs, we shouldn’t check to see if it has
scheduled jobs.
This commit is contained in:
Chris Hill-Scott
2020-10-06 11:53:00 +01:00
parent ef6681b69b
commit eb58851e93

View File

@@ -888,6 +888,7 @@ def test_should_not_show_upcoming_jobs_on_dashboard_if_service_has_no_jobs(
mock_get_template_statistics,
mock_get_service_statistics,
mock_has_no_jobs,
mock_get_scheduled_job_stats,
mock_get_usage,
mock_get_free_sms_fragment_limit,
mock_get_inbound_sms_summary,
@@ -898,6 +899,7 @@ def test_should_not_show_upcoming_jobs_on_dashboard_if_service_has_no_jobs(
service_id=SERVICE_ONE_ID,
)
mock_has_no_jobs.assert_called_once_with(SERVICE_ONE_ID)
assert mock_get_scheduled_job_stats.called is False
assert 'In the next few days' not in page.select_one('main').text
assert 'files waiting to send ' not in page.select_one('main').text