2024-02-25 12:15:55 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-11-26 06:49:35 -05:00
|
|
|
require "test_helper"
|
2018-09-15 14:03:51 -04:00
|
|
|
|
|
|
|
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
|
2022-02-19 11:07:58 -05:00
|
|
|
@user = create(:user)
|
2022-11-26 06:49:35 -05:00
|
|
|
as(@user) do
|
2022-11-25 15:06:54 -05:00
|
|
|
@artist = create(:artist, name: "bkub", url_string: "-http://bkub.com")
|
2022-02-19 11:07:58 -05:00
|
|
|
end
|
2018-09-15 14:03:51 -04:00
|
|
|
|
|
|
|
get artist_urls_path(search: {
|
2024-04-06 09:10:55 -04:00
|
|
|
artist_name: "bkub",
|
2018-09-15 14:03:51 -04:00
|
|
|
url_matches: "*bkub*",
|
|
|
|
is_active: "false",
|
2022-11-26 06:49:35 -05:00
|
|
|
order: "created_at",
|
2018-09-15 14:03:51 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
assert_response :success
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|