related tags: fix exception on copyright tags with nonexistent wiki pages.
This commit is contained in:
@@ -3,7 +3,7 @@ require 'test_helper'
|
||||
class RelatedTagsControllerTest < ActionDispatch::IntegrationTest
|
||||
context "The related tags controller" do
|
||||
setup do
|
||||
create(:post, tag_string: "touhou")
|
||||
create(:post, tag_string: "copy:touhou")
|
||||
end
|
||||
|
||||
context "show action" do
|
||||
@@ -16,6 +16,11 @@ class RelatedTagsControllerTest < ActionDispatch::IntegrationTest
|
||||
get related_tag_path(format: :json), params: { query: "touhou" }
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
should "work for .js responses for copyright tags without a wiki" do
|
||||
get related_tag_path(format: :js), params: { query: "touhou" }, xhr: true
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user