Fix #2990: Wiki Autocomplete Misses On Certain Meta-wikis

/wiki_pages?search[order]=post_count didn't include wiki pages that
didn't belong to a tag. This was due to doing an inner join on the tags
table instead of a left outer join.
This commit is contained in:
evazion
2017-04-23 16:53:34 -05:00
parent 76eefd0ffe
commit 30872ebb41
3 changed files with 7 additions and 2 deletions

View File

@@ -28,6 +28,11 @@ class WikiPagesControllerTest < ActionController::TestCase
get :index, {:search => {:title => "abc"}}
assert_redirected_to(wiki_page_path(@wiki_page_abc))
end
should "list wiki_pages without tags with order=post_count" do
get :index, {:search => {:title => "abc", :order => "post_count"}}
assert_redirected_to(wiki_page_path(@wiki_page_abc))
end
end
context "show action" do