diff --git a/app/__init__.py b/app/__init__.py index 3c71904df..ab3e924a2 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -284,6 +284,7 @@ def init_app(application): @application.context_processor def _attach_current_global_daily_messages(): + global global_limit remaining_global_messages = 0 if current_app: if request.view_args: @@ -302,8 +303,8 @@ def init_app(application): "count" ) return { + "global_message_limit": global_limit, "daily_global_messages_remaining": remaining_global_messages, - "global_message_limit": global_limit } @application.before_request diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index f0e07f105..f2c9af263 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -1531,7 +1531,7 @@ def test_service_dashboard_shows_usage( assert normalize_spaces(page.select_one("[data-key=usage]").text) == ( "Daily Usage Remaining " - "40,000 " + "251,800 " "$29.85 " "spent on text messages" # Disabled for pilot @@ -1566,4 +1566,4 @@ def test_service_dashboard_shows_free_allowance( usage_text = normalize_spaces(page.select_one("[data-key=usage]").text) assert "spent on text messages" not in usage_text - assert "Daily Usage Remaining -209,000 249,000" in usage_text + assert "Daily Usage Remaining 1,000 249,000" in usage_text