forum_topics/show: fix N+1 query patterns.

This commit is contained in:
evazion
2020-02-05 18:05:56 -06:00
parent db4c67ee86
commit 69f653b0c4
6 changed files with 6 additions and 22 deletions

View File

@@ -14,17 +14,6 @@ class ForumPostTest < ActiveSupport::TestCase
CurrentUser.ip_addr = nil
end
context "#votable?" do
setup do
@post = FactoryBot.build(:forum_post, :topic_id => @topic.id, :body => "[[aaa]] -> [[bbb]]")
@tag_alias = FactoryBot.create(:tag_alias, forum_post: @post)
end
should "be true for a post associated with a tag alias" do
assert(@post.votable?)
end
end
context "that mentions a user" do
context "in a quote block" do
setup do