diff --git a/app/controllers/admin/hidden_budget_investments_controller.rb b/app/controllers/admin/hidden_budget_investments_controller.rb index 6b977cdd3..1b99963f1 100644 --- a/app/controllers/admin/hidden_budget_investments_controller.rb +++ b/app/controllers/admin/hidden_budget_investments_controller.rb @@ -1,7 +1,7 @@ class Admin::HiddenBudgetInvestmentsController < Admin::BaseController include FeatureFlags - has_filters %w[all with_confirmed_hide without_confirmed_hide], only: :index + has_filters %w[without_confirmed_hide all with_confirmed_hide], only: :index feature_flag :budgets diff --git a/spec/system/admin/hidden_budget_investments_spec.rb b/spec/system/admin/hidden_budget_investments_spec.rb index 29c8a0a72..9f3f20bfe 100644 --- a/spec/system/admin/hidden_budget_investments_spec.rb +++ b/spec/system/admin/hidden_budget_investments_spec.rb @@ -31,9 +31,6 @@ describe "Admin hidden budget investments", :admin do investment = create(:budget_investment, :hidden, heading: heading) visit admin_hidden_budget_investments_path - click_link "Pending" - - expect(page).not_to have_link "Pending" expect(page).to have_content(investment.title) click_button "Confirm moderation" @@ -46,18 +43,18 @@ describe "Admin hidden budget investments", :admin do scenario "Current filter is properly highlighted" do visit admin_hidden_budget_investments_path - expect(page).not_to have_link("All") - expect(page).to have_link("Pending") - expect(page).to have_link("Confirmed") - - visit admin_hidden_budget_investments_path(filter: "without_confirmed_hide") + expect(page).not_to have_link("Pending") expect(page).to have_link("All") expect(page).to have_link("Confirmed") - expect(page).not_to have_link("Pending") + + visit admin_hidden_budget_investments_path(filter: "all") + expect(page).to have_link("Pending") + expect(page).not_to have_link("All") + expect(page).to have_link("Confirmed") visit admin_hidden_budget_investments_path(filter: "with_confirmed_hide") - expect(page).to have_link("All") expect(page).to have_link("Pending") + expect(page).to have_link("All") expect(page).not_to have_link("Confirmed") end