Remove unused sort_by_most_commented scope from Debate

The "sort_by_most_commented" scope in Debate is no longer used anywhere in
the code. Its last use was removed in commit b89f39bfef ("Removes
unused orders from debates controller")
This commit is contained in:
taitus
2025-10-24 14:10:47 +02:00
parent 8938b781c3
commit 4183734468
4 changed files with 0 additions and 17 deletions

View File

@@ -650,20 +650,6 @@ describe Debate do
expect(results).to eq [newest, recent, oldest]
end
it "is able to reorder by most commented after searching" do
least_commented = create(:debate, title: "stop corruption", cached_votes_up: 1, comments_count: 1)
most_commented = create(:debate, title: "stop corruption", cached_votes_up: 2, comments_count: 100)
some_comments = create(:debate, title: "stop corruption", cached_votes_up: 3, comments_count: 10)
results = Debate.search("stop corruption")
expect(results).to eq [some_comments, most_commented, least_commented]
results = results.sort_by_most_commented
expect(results).to eq [most_commented, some_comments, least_commented]
end
end
context "no results" do