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:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user