Add command to filter by tag

This commit is contained in:
Jorge Manrubia
2025-05-07 16:07:21 +02:00
parent b8daaa193a
commit 50da28c0be
3 changed files with 40 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
require "test_helper"
class Command::FilterByCardTest < ActionDispatch::IntegrationTest
include CommandTestHelper
setup do
@tag = tags(:web)
end
test "redirects to the cards index filtering by cards" do
result = execute_command "##{@tag.title}"
assert_equal cards_path(indexed_by: "newest", tag_ids: [ @tag.id ]), result.url
end
end