Fix #4240: only=… param malfunctioning on autocomplete API.

This commit is contained in:
evazion
2020-01-07 00:01:14 -06:00
parent 45f2530537
commit 3312030ce3
3 changed files with 10 additions and 1 deletions

View File

@@ -49,6 +49,13 @@ class TagsControllerTest < ActionDispatch::IntegrationTest
get autocomplete_tags_path, params: { search: { name_matches: "t" }, format: :json }
assert_response :success
end
should "respect the only param" do
get autocomplete_tags_path, params: { search: { name_matches: "t", only: "name" }, format: :json }
assert_response :success
assert_equal "touhou", response.parsed_body.first["name"]
end
end
context "show action" do