test/test_track.rb in firstfm-0.7.0 vs test/test_track.rb in firstfm-0.8.0

- old
+ new

@@ -1,23 +1,22 @@ require 'helper' - + class TestTrack < Test::Unit::TestCase - + def test_should_search_tracks - FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/tracks.xml")) + FakeWeb.register_uri(:get, %r|http://ws.audioscrobbler.com/|, :body => File.read(File.dirname(__FILE__) + "/fixtures/tracks.json")) tracks = Firstfm::Track.search("Believe") assert_equal 30, tracks.size - assert_equal 1880, tracks.total_pages + assert_equal 888, tracks.total_pages assert_equal 1, tracks.current_page - assert_equal 56384, tracks.total_entries + assert_equal 26620, tracks.total_entries track = tracks.first #raise track.inspect - assert_equal "Believe Me Natalie", track.name - assert_equal 494607, track.listeners - assert_equal "http://www.last.fm/music/The+Killers/_/Believe+Me+Natalie", track.url + assert_equal "Believe", track.name + assert_equal 248, track.listeners + assert_equal "http://www.last.fm/music/BELIEVE/_/Believe", track.url assert_equal nil, track.mbid - assert track.streamable assert_equal 4, track.images.size - assert_equal "The Killers", track.artist.name + assert_equal "BELIEVE", track.artist.name end - + end \ No newline at end of file