diff --git a/app/controllers/publish/courses/accredited_provider_controller.rb b/app/controllers/publish/courses/accredited_provider_controller.rb index 1578e46396..59993ca901 100644 --- a/app/controllers/publish/courses/accredited_provider_controller.rb +++ b/app/controllers/publish/courses/accredited_provider_controller.rb @@ -127,7 +127,7 @@ def errors_for_search_query(code, query) if other_selected_with_no_autocompleted_code?(code) && query.length < 2 errors = { accredited_provider: ['Accredited provider search too short, enter 2 or more characters'] } elsif code.blank? - errors = { accredited_provider_code: ['Select an accredited provider'] } + errors = { accredited_provider_code: ['Select a ratifying partner'] } end errors diff --git a/app/controllers/publish/providers/accredited_providers/checks_controller.rb b/app/controllers/publish/providers/accredited_providers/checks_controller.rb index f82af34bf5..5a58c2e475 100644 --- a/app/controllers/publish/providers/accredited_providers/checks_controller.rb +++ b/app/controllers/publish/providers/accredited_providers/checks_controller.rb @@ -10,7 +10,7 @@ def show def update accredited_provider_form.save! - redirect_to publish_provider_recruitment_cycle_accredited_providers_path(@provider.provider_code, @provider.recruitment_cycle_year), flash: { success: 'Accredited partner added' } + redirect_to publish_provider_recruitment_cycle_accredited_providers_path(@provider.provider_code, @provider.recruitment_cycle_year), flash: { success: 'Ratifying partner added' } end private diff --git a/config/locales/en.yml b/config/locales/en.yml index 99eddaac4a..5275f7bf04 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -828,7 +828,7 @@ en: applications_open_from: blank: "Select an applications open date" accrediting_provider: - blank: "Select an accredited partner" + blank: "Select a ratifying partner" is_not_accredited: "Update the ratifying partner" does_not_exist_in_cycle: "The accredited partner %{accredited_provider_code} does not exist in this cycle" is_send: diff --git a/spec/features/publish/courses/add_accredited_provider_when_publishing_a_course_spec.rb b/spec/features/publish/courses/add_accredited_provider_when_publishing_a_course_spec.rb index 0de4ea0111..8971779c4a 100644 --- a/spec/features/publish/courses/add_accredited_provider_when_publishing_a_course_spec.rb +++ b/spec/features/publish/courses/add_accredited_provider_when_publishing_a_course_spec.rb @@ -7,8 +7,8 @@ given_i_am_authenticated_as_a_provider_user end - scenario 'Add accrediting provider to provider and provider has no accrediting providers, change accrediting provider of course then publish' do - and_the_provider_has_no_accredited_provider + scenario 'Add ratifying provider to training provider and provider has no accredited partner, change ratifying provider of course then publish' do + and_the_provider_has_no_accredited_partners and_there_is_a_draft_course_with_an_unaccredited_provider # Publising is invalid @@ -68,7 +68,7 @@ def and_the_provider_has_a_valid_accrediting_provider provider.update!(accrediting_provider_enrichments: [enrichment]) end - def and_the_provider_has_no_accredited_provider + def and_the_provider_has_no_accredited_partners expect(provider.accredited_providers).to be_empty end @@ -104,11 +104,11 @@ def then_i_should_see_a_success_message end def then_i_should_see_an_error_message_that_accredited_provider_is_not_accredited - expect(publish_provider_courses_show_page.error_messages).to include('Update the ratifying provider') + expect(publish_provider_courses_show_page.error_messages).to include('Update the ratifying partner') end def then_i_should_see_an_error_message_for_the_accrediting_provider - expect(publish_provider_courses_show_page.error_messages).to include('Select an accredited provider') + expect(publish_provider_courses_show_page.error_messages).to include('Select a ratifying partner') end def when_i_click_the_error_message_link @@ -150,7 +150,7 @@ def and_i_click_the_publish_button end def when_i_click_the_select_accredited_provider_error_message_link - page.click_link_or_button('Select an ratifying partner') + page.click_link_or_button('Select a ratifying partner') end def and_i_choose_the_new_accredited_provider