Remove /meta_searches/tags page.

This was a search page that let you search for tags, aliases, and
implications at the same time. It never got much use and it's been
broken for a while now (the search form passed the wrong param to the
controller).
This commit is contained in:
evazion
2020-01-07 11:10:56 -06:00
parent 2aa3ced372
commit 1ab6a353ca
11 changed files with 1 additions and 212 deletions

View File

@@ -1,12 +0,0 @@
require 'test_helper'
class MetaSearchesControllerTest < ActionDispatch::IntegrationTest
context "The meta searches controller" do
context "tags action" do
should "work" do
get meta_searches_tags_path, params: {name: "long_hair"}
assert_response :success
end
end
end
end

View File

@@ -1,36 +0,0 @@
require "test_helper"
module MetaSearches
class TagTest < ActionMailer::TestCase
context "The tag metasearch" do
setup do
CurrentUser.user = FactoryBot.create(:user)
CurrentUser.ip_addr = "127.0.0.1"
FactoryBot.create(:post, :tag_string => "xxx")
FactoryBot.create(:tag_alias, :antecedent_name => "aaa", :consequent_name => "bbb")
FactoryBot.create(:tag_implication, :antecedent_name => "ccc", :consequent_name => "ddd")
end
should "find the tag" do
meta_search = MetaSearches::Tag.new(:name => "xxx")
meta_search.load_all
assert_equal(1, meta_search.tags.size)
assert_equal("xxx", meta_search.tags.first.name)
end
should "find the alias" do
meta_search = MetaSearches::Tag.new(:name => "aaa")
meta_search.load_all
assert_equal(1, meta_search.tag_aliases.size)
assert_equal("aaa", meta_search.tag_aliases.first.antecedent_name)
end
should "find the implication" do
meta_search = MetaSearches::Tag.new(:name => "ccc")
meta_search.load_all
assert_equal(1, meta_search.tag_implications.size)
assert_equal("ccc", meta_search.tag_implications.first.antecedent_name)
end
end
end
end