diff --git a/lib/data/recruitment_banners.yml b/lib/data/recruitment_banners.yml deleted file mode 100644 index 645afde32..000000000 --- a/lib/data/recruitment_banners.yml +++ /dev/null @@ -1,35 +0,0 @@ -# Example usage of adding a banner to the banners list: - - # - name: Banner 1 - # suggestion_text: "Help improve GOV.UK" - # suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - # survey_url: https://google.com - # page_paths: - # - / - # - /foreign-travel-advice - -banners: -- name: AI banner 11/11/2024 - suggestion_text: "Help improve GOV.UK" - suggestion_link_text: "Sign up to take part in user research (opens in a new tab)" - survey_url: https://survey.take-part-in-research.service.gov.uk/jfe/form/SV_2bggmg6xlelrO0S - page_paths: - - /self-assessment-tax-returns - - /working-for-yourself - - /self-employed-records - - /expenses-if-youre-self-employed - - /first-company-accounts-and-return - - /what-is-the-construction-industry-scheme - - /capital-allowances - - /simpler-income-tax-cash-basis - - /expenses-and-benefits-a-to-z - - /capital-gains-tax - - /directors-loans - - /self-assessment-tax-return-forms - - /running-a-limited-company - - /calculate-tax-on-company-cars - - /introduction-to-business-rates - - /calculate-your-business-rates - - /apply-for-business-rate-relief - - /stop-being-self-employed - - /tax-codes diff --git a/test/unit/helpers/recruitment_banner_helper_test.rb b/test/unit/helpers/recruitment_banner_helper_test.rb deleted file mode 100644 index 3c261853f..000000000 --- a/test/unit/helpers/recruitment_banner_helper_test.rb +++ /dev/null @@ -1,51 +0,0 @@ -require "test_helper" - -class RecruitmentBannerHelperTest < ActionView::TestCase - include RecruitmentBannerHelper - - def setup - @recruitment_banners_data = YAML.load_file(Rails.root.join("test/fixtures/recruitment_banners.yml")) - end - - def request - OpenStruct.new(path: "/") - end - - def recruitment_banners - @recruitment_banners_data["banners"] - end - - test "recruitment_banner returns banners that include the current url" do - actual_banners = recruitment_banner - - expected_banners = - { - "name" => "Banner 1", - "suggestion_text" => "Help improve GOV.UK", - "suggestion_link_text" => "Take part in user research", - "survey_url" => "https://google.com", - "page_paths" => ["/"], - } - assert_equal expected_banners, actual_banners - end - - test "recruitment_banners yaml structure is valid" do - @recruitment_banners_data = YAML.load_file(Rails.root.join("lib/data/recruitment_banners.yml")) - - if @recruitment_banners_data["banners"].present? - recruitment_banners.each do |banner| - assert banner.key?("suggestion_text"), "Banner is missing 'suggestion_text' key" - assert_not banner["suggestion_text"].blank?, "'suggestion_text' key should not be blank" - - assert banner.key?("suggestion_link_text"), "Banner is missing 'suggestion_link_text' key" - assert_not banner["suggestion_link_text"].blank?, "'suggestion_link_text' key should not be blank" - - assert banner.key?("survey_url"), "Banner is missing 'survey_url' key" - assert_not banner["survey_url"].blank?, "'survey_url' key should not be blank" - - assert banner.key?("page_paths"), "Banner is missing 'page_paths' key" - assert_not banner["page_paths"].blank?, "'page_paths' key should not be blank" - end - end - end -end