Fix tests

This commit is contained in:
Jorge Manrubia
2025-06-25 10:37:42 +02:00
parent ed4baf2eff
commit 00a9b431d1
4 changed files with 8 additions and 19 deletions
+1 -8
View File
@@ -12,7 +12,7 @@ class Command::Parser::Context
if viewing_card_contents?
user.accessible_cards.where id: params[:id]
elsif viewing_list_of_cards?
filtered_cards
filter.cards.published
else
Card.none
end
@@ -43,11 +43,4 @@ class Command::Parser::Context
@action = route[:action]
@params = ActionController::Parameters.new(Rack::Utils.parse_nested_query(uri.query).merge(route.except(:controller, :action)))
end
def filtered_cards
open_cards = filter.cards.published.limit(MAX_CARDS)
closed_cards = filter.indexed_by.stalled? || filter.indexed_by.closed? ? Card.none : filter.with(indexed_by: "closed").cards.limit(MAX_CLOSED_CARDS)
Rails.logger.info "CLOSED CARDS: #{closed_cards.collect(&:title)}"
user.accessible_cards.where(id: open_cards.ids + closed_cards.ids)
end
end