From 4792040240ad35895801bc319fef628993bbcf6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <2887858+deivid-rodriguez@users.noreply.github.com> Date: Wed, 26 Nov 2025 12:17:29 +0100 Subject: [PATCH] Cover tax category removal with a spec --- .../system/admin/configuration/tax_categories_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/system/admin/configuration/tax_categories_spec.rb b/spec/system/admin/configuration/tax_categories_spec.rb index ea5074d8bf..56605a5848 100644 --- a/spec/system/admin/configuration/tax_categories_spec.rb +++ b/spec/system/admin/configuration/tax_categories_spec.rb @@ -55,4 +55,15 @@ RSpec.describe "Tax Categories" do expect(page).to have_content("desc 99") end end + + context "admin deleting a tax category" do + it "should be able to delete an existing tax category" do + create(:tax_category, name: "To be removed") + click_link "Tax Categories" + accept_confirm('Are you sure?') do + within_row(1) { find(".icon-trash").click } + end + expect(page).not_to have_content("To be removed") + end + end end