artist urls: add tests for controller + artist url search.

This commit is contained in:
evazion
2018-09-15 13:03:51 -05:00
parent 3afc0b3a78
commit c9b3c8d217
2 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
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 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