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:
albert
2010-10-27 16:56:12 -04:00
parent 484ff696e2
commit 1c9d8c37c7
16 changed files with 214 additions and 104 deletions

View File

@@ -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