search: clean up filetype: metatag.

* Fix not being able to use the filetype: metatag twice in the same search.
* Support comma-separated filetypes (filetype:png,jpg).
This commit is contained in:
evazion
2020-04-20 04:07:59 -05:00
parent c92ac9ab89
commit fef90b46ee
3 changed files with 25 additions and 13 deletions

View File

@@ -496,6 +496,10 @@ class PostQueryBuilderTest < ActiveSupport::TestCase
assert_tag_match([png], "filetype:png")
assert_tag_match([jpg], "-filetype:png")
assert_tag_match([jpg, png], "filetype:png,jpg")
assert_tag_match([], "filetype:png filetype:jpg")
assert_tag_match([], "-filetype:png -filetype:jpg")
assert_tag_match([], "filetype:garbage")
end
should "return posts for the tagcount:<n> metatags" do