diff --git a/app/components/admin/budgets/help_component.rb b/app/components/admin/budgets/help_component.rb index bd47604d4..b99f91a2c 100644 --- a/app/components/admin/budgets/help_component.rb +++ b/app/components/admin/budgets/help_component.rb @@ -6,7 +6,7 @@ class Admin::Budgets::HelpComponent < ApplicationComponent end def budget_mode - (helpers.budget_mode if helpers.respond_to?(:budget_mode)) || "multiple" + (helpers.budget_mode if helpers.respond_to?(:budget_mode)).presence || "multiple" end private diff --git a/spec/system/admin/budgets_wizard/headings_spec.rb b/spec/system/admin/budgets_wizard/headings_spec.rb index 0a093ed8f..28d6c1657 100644 --- a/spec/system/admin/budgets_wizard/headings_spec.rb +++ b/spec/system/admin/budgets_wizard/headings_spec.rb @@ -81,6 +81,11 @@ describe "Budgets wizard, headings step", :admin do expect(page).to have_button "Cancel" expect(page).not_to have_button "Add new heading" expect(page).not_to have_content "Continue to phases" + + within ".budgets-help" do + expect(page).to have_content "Headings are meant" + expect(page).not_to have_content "{" + end end end