Put the inbound number on the invite page

Inbound number and SMS sender are divorced from each other now. This
page was assuming that they were the same thing.
This commit is contained in:
Chris Hill-Scott
2017-08-24 10:02:02 +01:00
parent ed9b4362e7
commit 453ee44dfb
3 changed files with 10 additions and 1 deletions

View File

@@ -394,6 +394,7 @@ def service_set_international_sms(service_id):
def service_set_inbound_sms(service_id):
return render_template(
'views/service-settings/set-inbound-sms.html',
inbound_number=inbound_number_client.get_inbound_sms_number_for_service(service_id)['data']['number'],
)

View File

@@ -13,7 +13,7 @@
<h1 class="heading-large">Receive text messages</h1>
{% if 'inbound_sms' in current_service.permissions %}
<p>
Your service can receive text messages sent to {{ current_service.sms_sender }}.
Your service can receive text messages sent to {{ inbound_number }}.
</p>
<p>
If you want to turn this feature off,

View File

@@ -1311,13 +1311,21 @@ def test_cant_resume_active_service(
'feature.'
)
),
(
'main.service_set_inbound_sms',
(
'Your service can receive text messages sent to 0781239871.'
)
),
])
def test_invitation_pages(
logged_in_client,
service_one,
endpoint,
expected_p,
mock_get_inbound_number_for_service,
):
service_one['permissions'] = ['sms', 'email', 'inbound_sms']
response = logged_in_client.get(url_for(endpoint, service_id=service_one['id']))
assert response.status_code == 200