PostSetPresenters::Post#related_posts: clean up metatag parsing (#2894).
* Fix `#related_tags` to use `Tag.has_metatag?`. * Fix Tag::SUBQUERY_METATAGS and Tag::METATAGS to be arrays instead of regexes.
This commit is contained in:
@@ -242,8 +242,8 @@ class TagTest < ActiveSupport::TestCase
|
||||
should_not allow_value("café").for(:name).on(:create)
|
||||
should_not allow_value("東方").for(:name).on(:create)
|
||||
|
||||
metatags = Tag::METATAGS.split("|") + Tag::SUBQUERY_METATAGS.split("|") + TagCategory.mapping.keys
|
||||
metatags.split("|").each do |metatag|
|
||||
metatags = Tag::METATAGS + TagCategory.mapping.keys
|
||||
metatags.each do |metatag|
|
||||
should_not allow_value("#{metatag}:foo").for(:name).on(:create)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user