Sha256: a676cb13bea73105c22fab244d7a16811d836546e87dec21a83ce507790a64b4

Contents?: true

Size: 927 Bytes

Versions: 6

Compression:

Stored size: 927 Bytes

Contents

require 'spec_helper'

module Beatport::Catalog
  describe Country do
    before :each do
      VCR.insert_cassette 'country'
    end

    after :each do
      VCR.eject_cassette
    end

    describe 'structure' do
      subject { Country.find('au') }
      
      it { should be_a(Country) }
      its (:id) { should ==  5 }
      its (:code) { should == "AUS" }
      its (:code_short) { should == "AU" }
      its (:name) { should == "Australia" }
      its (:vat_enabled) { should == "0" }
      its (:vat_rate) { should == 0 }
      its (:iso3166_3) { should == "AUS" }
      its (:iso3166_2) { should == "AU" }
      its (:'currency.code') { should == "USD" }
      its (:'currency.name') { should == "Dollar" }
      its (:'states.first.code') { should == 'ACT' }
      its (:'states.first.type') { should == 'territory' } 
      its (:'states.first.name') { should == "Australian Capital Territory" }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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