mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-21 00:23:53 -04:00
Merge pull request #4222 from alphagov/1-may-price-change
Update text message rate on 1 May 2022
This commit is contained in:
@@ -356,3 +356,36 @@ def test_font_preload(
|
||||
for element in preload_tags:
|
||||
assert element['href'].startswith('https://static.example.com/fonts/')
|
||||
assert element['href'].endswith('.woff2')
|
||||
|
||||
|
||||
@pytest.mark.parametrize('current_date, expected_rate', (
|
||||
('2022-04-30', '1.61'),
|
||||
('2022-05-01', '1.72'),
|
||||
))
|
||||
def test_sms_price(
|
||||
client_request,
|
||||
mock_get_service_and_organisation_counts,
|
||||
current_date,
|
||||
expected_rate,
|
||||
):
|
||||
client_request.logout()
|
||||
|
||||
with freeze_time(current_date):
|
||||
home_page = client_request.get('main.index', _test_page_title=False)
|
||||
pricing_page = client_request.get('main.pricing')
|
||||
|
||||
assert normalize_spaces(
|
||||
home_page.select('.product-page-section')[5].select('.govuk-grid-column-one-half')[1].text
|
||||
) == (
|
||||
f'Text messages '
|
||||
f'Up to 40,000 free text messages a year, '
|
||||
f'then {expected_rate} pence per message'
|
||||
)
|
||||
|
||||
assert normalize_spaces(
|
||||
pricing_page.select_one('#text-messages + p + p').text
|
||||
) == (
|
||||
f'When a service has used its annual allowance, it costs '
|
||||
f'{expected_rate} pence (plus VAT) for each text message you '
|
||||
f'send.'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user