diff --git a/app/templates/views/providers/edit-sms-provider-ratio.html b/app/templates/views/providers/edit-sms-provider-ratio.html index dc7ca15ae..832a31fe9 100644 --- a/app/templates/views/providers/edit-sms-provider-ratio.html +++ b/app/templates/views/providers/edit-sms-provider-ratio.html @@ -51,7 +51,7 @@ {% for day, versions in versions %}

{% if day %} - {{ day|format_date_human|title }} + {{ versions[0]['updated_at']|format_date_human|title }} {% else %} Start {% endif %} diff --git a/tests/app/main/views/test_providers.py b/tests/app/main/views/test_providers.py index dd23cf09b..4ac011f70 100644 --- a/tests/app/main/views/test_providers.py +++ b/tests/app/main/views/test_providers.py @@ -6,6 +6,7 @@ from unittest.mock import call import pytest from bs4 import BeautifulSoup from flask import url_for +from freezegun import freeze_time import app from app.main.views.providers import add_monthly_traffic @@ -409,6 +410,7 @@ def test_should_show_provider_version_history( assert second_row[4].text.strip() == "True" +@freeze_time('2022-2-22 15:00') def test_should_show_version_history_for_first_two_sms_providers( client_request, platform_admin_user, @@ -473,8 +475,8 @@ def test_should_show_version_history_for_first_two_sms_providers( for heading in page.select('main h2') ] == [ 'Now', - '21 February 2022', - '31 December', + 'Today', + '1 January 2020', ] assert [