for artist urls, normalize https
This commit is contained in:
@@ -94,10 +94,13 @@ class ArtistTest < ActiveSupport::TestCase
|
||||
should "find matches by url" do
|
||||
a1 = FactoryGirl.create(:artist, :name => "rembrandt", :url_string => "http://rembrandt.com/test.jpg")
|
||||
a2 = FactoryGirl.create(:artist, :name => "subway", :url_string => "http://subway.com/test.jpg")
|
||||
a3 = FactoryGirl.create(:artist, :name => "minko", :url_string => "https://minko.com/test.jpg")
|
||||
|
||||
assert_equal(["rembrandt"], Artist.find_all_by_url("http://rembrandt.com/test.jpg").map(&:name))
|
||||
assert_equal(["rembrandt"], Artist.find_all_by_url("http://rembrandt.com/another.jpg").map(&:name))
|
||||
assert_equal([], Artist.find_all_by_url("http://nonexistent.com/test.jpg").map(&:name))
|
||||
assert_equal(["minko"], Artist.find_all_by_url("https://minko.com/test.jpg").map(&:name))
|
||||
assert_equal(["minko"], Artist.find_all_by_url("http://minko.com/test.jpg").map(&:name))
|
||||
end
|
||||
|
||||
should "not allow duplicates" do
|
||||
|
||||
Reference in New Issue
Block a user