Remove checks for renaming without changes

When checking the service or organisation name for uniqueness before
changing it, it would be necessary to exclude the current name from
this check. However now we are changing it immediately we don’t need
to guard around this behaviour of the uniqueness check.

So this commit removes the guard for both renaming a service and an
organisation.
This commit is contained in:
Chris Hill-Scott
2022-01-13 10:20:43 +00:00
parent 24ff80280e
commit 3ab30f27b6
4 changed files with 0 additions and 43 deletions

View File

@@ -1275,25 +1275,6 @@ def test_update_organisation_with_non_unique_name(
assert 'This organisation name is already in use' in page.select_one('.govuk-error-message').text
def test_confirm_update_organisation_with_existing_name(
client_request,
platform_admin_user,
fake_uuid,
mock_get_organisation,
):
client_request.login(platform_admin_user)
client_request.post(
'.edit_organisation_name',
org_id=fake_uuid,
_data={'name': 'Test organisation'},
_expected_redirect=url_for(
'.organisation_settings',
org_id=fake_uuid,
_external=True,
)
)
def test_get_edit_organisation_go_live_notes_page(
client_request,
platform_admin_user,

View File

@@ -536,24 +536,6 @@ def test_should_show_service_name_with_no_prefixing(
).text == 'Your service name should tell users what the message is about as well as who its from.'
def test_should_not_hit_api_if_service_name_hasnt_changed(
client_request,
mock_update_service,
):
client_request.post(
'main.service_name_change',
service_id=SERVICE_ONE_ID,
_data={'name': 'service one'},
_expected_status=302,
_expected_redirect=url_for(
'main.service_settings',
service_id=SERVICE_ONE_ID,
_external=True,
),
)
assert not mock_update_service.called
@pytest.mark.parametrize('name, error_message', [
('', 'Cannot be empty'),
('.', 'Must include at least two alphanumeric characters'),