spec/method_specs/artist_spec.rb in lastfm-1.5.1 vs spec/method_specs/artist_spec.rb in lastfm-1.6.0

- old
+ new

@@ -74,6 +74,22 @@ tags.size.should == 2 tags[0]['name'].should == 'punk' tags[1]['name'].should == 'Awesome' end end + + describe '#search' do + it 'should search' do + @lastfm.should_receive(:request).with('artist.search', { + :artist => 'RADWIMPS', + :limit => 10, + :page => 3, + }).and_return(make_response('artist_search')) + + tracks = @lastfm.artist.search('RADWIMPS', 10, 3) + tracks['results']['for'].should == 'RADWIMPS' + tracks['results']['totalResults'].should == '3' + tracks['results']['artistmatches']['artist'].size.should == 3 + tracks['results']['artistmatches']['artist'][0]['name'].should == 'RADWIMPS' + end + end end