Files
danbooru/test/functional/artist_urls_controller_test.rb
evazion 45b3370d49 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).
2020-06-10 18:16:58 -05:00

31 lines
763 B
Ruby

require 'test_helper'
class ArtistUrlsControllerTest < ActionDispatch::IntegrationTest
context "The artist urls controller" do
context "index page" do
should "render" do
get artist_urls_path
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")
get artist_urls_path(search: {
artist: { name: "bkub" },
url_matches: "*bkub*",
is_active: "false",
order: "created_at"
})
assert_response :success
end
end
end
end