Fix #4199: Aliased tags not included in related wiki tags.

This commit is contained in:
evazion
2019-10-24 19:44:59 -05:00
parent 6dcf0484f0
commit ac775e2bdd
2 changed files with 10 additions and 1 deletions

View File

@@ -98,6 +98,14 @@ class RelatedTagQueryTest < ActiveSupport::TestCase
query = RelatedTagQuery.new(query: "wiki")
assert_equal(%w[ccc bbb aaa], query.wiki_page_tags)
end
should "return aliased tags" do
create(:tag_alias, antecedent_name: "kitten", consequent_name: "cat", status: "active")
create(:wiki_page, title: "wiki", body: "[[kitten]]")
query = RelatedTagQuery.new(query: "wiki")
assert_equal(%w[cat], query.wiki_page_tags)
end
end
end