Add support for filtering by creation or completion windows of times
This commit is contained in:
@@ -121,6 +121,13 @@ class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
|
||||
assert_command({ commands: [ "/add_card urgent issue" ] }, "create card urgent issue")
|
||||
end
|
||||
|
||||
vcr_record!
|
||||
|
||||
test "filter by time ranges" do
|
||||
assert_command({context: {completion: "thisweek", indexed_by: "closed"}}, "cards completed this week")
|
||||
assert_command({context: {creation: "thisweek", tag_ids: ["design"], creator_id: "jz"}}, "cards created this week by jz tagged as #design")
|
||||
end
|
||||
|
||||
private
|
||||
def assert_command(expected, query, context: :list)
|
||||
assert_equal expected, translate(query, context:)
|
||||
|
||||
Reference in New Issue
Block a user