Sha256: 3a8f598865d07102b8ac27b3f81a4119522122229eaac599c0a8433f330f3810

Contents?: true

Size: 841 Bytes

Versions: 5

Compression:

Stored size: 841 Bytes

Contents

require 'spec_helper'

module Beatport::Catalog
  describe Mixed do
    before :each do
      VCR.insert_cassette 'mixed'
    end

    after :each do
      VCR.eject_cassette
    end

    describe '.all' do
      subject do
        Mixed.all(
          :label_ids => [804,1390],
          :artist_ids => [7181, 10395],
          :chart_ids => [15722, 29514],
          :release_ids => [164808, 385763],
          :track_ids => [1873426,1746687]
        )
      end

      it "should return two of each type" do
        subject.map(&:type).should == ['label', 'label', 'artist', 'artist', 'chart', 'chart', 'release', 'release', 'track', 'track']
      end

      it "should return the right ids" do
        subject.map(&:id).sort.should == [804, 1390, 7181, 10395, 15722, 29514, 164808, 385763, 1746687, 1873426]
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
beatport-0.1.10 spec/catalog/mixed_spec.rb
beatport-0.1.9 spec/catalog/mixed_spec.rb
beatport-0.1.8 spec/catalog/mixed_spec.rb
beatport-0.1.7 spec/catalog/mixed_spec.rb
beatport-0.1.6 spec/catalog/mixed_spec.rb