spec/method_specs/artist_spec.rb in lastfm-1.10.0 vs spec/method_specs/artist_spec.rb in lastfm-1.11.0
- old
+ new
@@ -15,11 +15,11 @@
top_tracks = @lastfm.artist.get_top_tracks(:artist => 'Cher')
top_tracks.size.should > 1
end
end
-
+
describe '#get_top_albums' do
it 'should get top albums' do
@lastfm.should_receive(:request).with('artist.getTopAlbums', {
:artist => 'Cher'
}).and_return(make_response('artist_get_top_albums'))
@@ -62,9 +62,28 @@
events[0]['image'][0]['content'].should == 'http://userserve-ak.last.fm/serve/34/34814037.jpg'
events[0]['startDate'].should == 'Sat, 23 Oct 2010 19:30:00'
events[0]['tickets']['ticket']['supplier'].should == 'TicketMaster'
events[0]['tickets']['ticket']['content'].should == 'http://www.last.fm/affiliate/byid/29/1584537/12/ws.artist.events.b25b959554ed76058ac220b7b2e0a026'
events[0]['tags']['tag'].should == ['pop', 'dance', 'female vocalists', '80s', 'cher']
+ end
+ end
+
+ describe '#get_images' do
+ it 'should get images' do
+ @lastfm.should_receive(:request).with('artist.getImages', {
+ :artist => 'Cher',
+ }).and_return(make_response('artist_get_images'))
+
+ images = @lastfm.artist.get_images(:artist => 'Cher')
+ images.count.should == 2
+ images[1]['title'].should == 'Early years'
+ images[1]['url'].should == 'http://www.last.fm/music/Cher/+images/34877783'
+ images[1]['dateadded'].should == 'Tue, 8 Sep 2009 05:40:36'
+ images[1]['format'].should == 'jpg'
+ images[1]['owner']['type'].should == 'user'
+ images[1]['owner']['name'].should == 'djosci_coelho'
+ images[1]['owner']['url'].should == 'http://www.last.fm/user/djosci_coelho'
+ images[1]['sizes']['size'].length.should == 6
end
end
describe '#get_similar' do
it 'should get similar artists' do