models: fix exception in api_attributes.

Fixup bug in eacb4d4df when calling `api_attributes` on an object that
doesn't have a policy (its policy inherited from ApplicationPolicy).
This commit is contained in:
evazion
2020-06-10 18:16:58 -05:00
parent 8a2ae91ff2
commit 45b3370d49
2 changed files with 7 additions and 1 deletions

View File

@@ -8,6 +8,11 @@ class ArtistUrlsControllerTest < ActionDispatch::IntegrationTest
assert_response :success
end
should "render for a json request" do
get artist_urls_path, as: :json
assert_response :success
end
should "render for a complex search" do
@artist = FactoryBot.create(:artist, name: "bkub", url_string: "-http://bkub.com")