posts: fix exception in random:1 filetype:png.

This commit is contained in:
evazion
2022-11-15 19:33:25 -06:00
parent e935f01358
commit bc169fc98c
2 changed files with 4 additions and 3 deletions

View File

@@ -1270,11 +1270,12 @@ class PostQueryBuilderTest < ActiveSupport::TestCase
end
should "return posts for the random:<N> metatag" do
post = create(:post)
post = create(:post, media_asset: build(:media_asset, file_ext: "png"))
assert_tag_match([], "random:0")
assert_tag_match([post], "random:1")
assert_tag_match([post], "random:1000")
assert_tag_match([post], "random:1 filetype:png")
end
should "return posts ordered by a particular attribute" do