spec/lib/rspotify/artist_spec.rb in rspotify-1.0.0 vs spec/lib/rspotify/artist_spec.rb in rspotify-1.1.0
- old
+ new
@@ -32,10 +32,18 @@
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
+
+ it 'should find artist with correct related artists' do
+ related_artists = @artist.related_artists
+ expect(related_artists) .to be_an Array
+ expect(related_artists.size) .to eq 20
+ expect(related_artists.first) .to be_an RSpotify::Artist
+ expect(related_artists.map(&:name)) .to include('Miles Kane', 'We Are Scientists', 'Razorlight')
+ end
end
describe 'Artist::find receiving array of ids' do
it 'should find the right artists' do
ids = ['0oSGxfWSnnOXhD2fKuz2Gy']
@@ -67,13 +75,13 @@
expect(artists.size) .to eq 10
expect(artists.map(&:name)) .to include('Arctic Monkeys', 'Arctic')
artists = RSpotify::Artist.search('Arctic', offset: 10)
expect(artists.size) .to eq 20
- expect(artists.map(&:name)) .to include('Arctic Flame', 'James Arctic')
+ expect(artists.map(&:name)) .to include('Arctic Light', 'Arctic Night')
artists = RSpotify::Artist.search('Arctic', limit: 10, offset: 10)
expect(artists.size) .to eq 10
- expect(artists.map(&:name)) .to include('Arctic Flame')
+ expect(artists.map(&:name)) .to include('Arctic Light')
end
end
end