spec/lib/rspotify/artist_spec.rb in rspotify-0.4.0 vs spec/lib/rspotify/artist_spec.rb in rspotify-0.5.0
- old
+ new
@@ -15,9 +15,17 @@
expect(@artist.name) .to eq 'Arctic Monkeys'
expect(@artist.popularity) .to be > 0
expect(@artist.type) .to eq 'artist'
expect(@artist.uri) .to eq 'spotify:artist:7Ln80lUS6He07XvHI8qqHH'
end
+
+ it 'should find artist with correct top tracks' do
+ top_tracks = @artist.top_tracks(:US)
+ expect(top_tracks) .to be_an Array
+ expect(top_tracks.size) .to eq 10
+ expect(top_tracks.first) .to be_an RSpotify::Track
+ expect(top_tracks.map(&:name)) .to include('Do I Wanna Know?', 'R U Mine?', 'Arabella', 'Knee Socks')
+ end
end
describe 'Artist#search' do
it 'should search for the right artists' do
artists = RSpotify::Artist.search('Arctic')