Fixed some major bugs with implications, cleaning up the cache
expiration process and adding some additional tests. Cleaned up the unit tests. They should all run cleanly with rake test:units now.
This commit is contained in:
@@ -48,7 +48,7 @@ class ArtistTest < ActiveSupport::TestCase
|
||||
should "parse urls" do
|
||||
artist = Factory.create(:artist, :name => "rembrandt", :url_string => "http://rembrandt.com/test.jpg http://aaa.com")
|
||||
artist.reload
|
||||
assert_equal(["http://aaa.com", "http://rembrandt.com/test.jpg"], artist.artist_urls.map(&:to_s).sort)
|
||||
assert_equal(["http://aaa.com", "http://rembrandt.com/test.jpg"], artist.urls.map(&:to_s).sort)
|
||||
end
|
||||
|
||||
should "make sure old urls are deleted" do
|
||||
@@ -56,7 +56,7 @@ class ArtistTest < ActiveSupport::TestCase
|
||||
artist.url_string = "http://not.rembrandt.com/test.jpg"
|
||||
artist.save
|
||||
artist.reload
|
||||
assert_equal(["http://not.rembrandt.com/test.jpg"], artist.artist_urls.map(&:to_s).sort)
|
||||
assert_equal(["http://not.rembrandt.com/test.jpg"], artist.urls.map(&:to_s).sort)
|
||||
end
|
||||
|
||||
should "find matches by url" do
|
||||
|
||||
Reference in New Issue
Block a user