Keep the current filter params after deleting a saved filter so you can change your mind

This commit is contained in:
Jason Zimdars
2025-06-26 10:19:24 -05:00
parent 1382d8dcb4
commit b862d5909a
2 changed files with 7 additions and 3 deletions
+5 -2
View File
@@ -25,9 +25,12 @@ class FiltersControllerTest < ActionDispatch::IntegrationTest
end
test "destroy" do
filter = filters(:jz_assignments)
expected_params = filter.as_params
assert_difference "users(:david).filters.count", -1 do
delete filter_path(filters(:jz_assignments))
delete filter_path(filter)
end
assert_redirected_to cards_path
assert_redirected_to cards_path(expected_params)
end
end