autocomplete: remove old autocomplete endpoints.

Remove /tag/autocomplete.json and /saved_searches/labels.json.
This commit is contained in:
evazion
2020-12-20 00:39:05 -06:00
parent 9de7a07af7
commit 28926c2332
9 changed files with 2 additions and 303 deletions

View File

@@ -44,19 +44,6 @@ class SavedSearchTest < ActiveSupport::TestCase
end
end
context ".search_labels" do
setup do
FactoryBot.create(:tag_alias, antecedent_name: "bbb", consequent_name: "ccc", creator: @user)
FactoryBot.create(:saved_search, user: @user, label_string: "blah", query: "aaa")
FactoryBot.create(:saved_search, user: @user, label_string: "blahbling", query: "CCC BBB AAA")
FactoryBot.create(:saved_search, user: @user, label_string: "qux", query: " aaa bbb ccc ")
end
should "fetch the queries used by a user for a label" do
assert_equal(%w(blah blahbling), SavedSearch.search_labels(@user.id, label: "blah"))
end
end
context ".post_ids_for" do
context "with a label" do
setup do