require 'spec_helper' # rspec spec/tophatter_merchant/metadata_spec.rb describe TophatterMerchant::Metadata do describe '.metadata' do xit 'returns metadata' do result = TophatterMerchant::Metadata.all expect(result.keys.include?('categories')).to be(true) expect(result.keys.include?('conditions')).to be(true) expect(result.keys.include?('brands')).to be(true) expect(result.keys.include?('materials')).to be(true) expect(result.keys.include?('sizes')).to be(true) expect(result.keys.include?('colors')).to be(true) expect(result.keys.include?('countries')).to be(true) expect(result.keys.include?('country_codes')).to be(true) expect(result.keys.include?('states')).to be(true) expect(result.keys.include?('provinces')).to be(true) expect(result.keys.include?('territories')).to be(true) expect(result.keys.include?('carriers')).to be(true) end end describe '.categories' do xit 'returns categories' do result = TophatterMerchant::Metadata.categories expect(result.include?('Apparel | Swim | Tops')).to be(true) end end describe '.conditions' do xit 'returns conditions' do result = TophatterMerchant::Metadata.conditions expect(result.include?('New')).to be(true) expect(result.include?('New with Tags')).to be(true) expect(result.include?('New with Defects')).to be(true) expect(result.include?('Used')).to be(true) expect(result.include?('Refurbished')).to be(true) end end describe '.materials' do xit 'returns materials' do result = TophatterMerchant::Metadata.materials expect(result.key?('Gemstones')).to be(true) expect(result['Gemstones'].include?('Star Ruby')).to be(true) end end describe '.sizes' do xit 'returns sizes' do result = TophatterMerchant::Metadata.sizes expect(result.key?('Accessories')).to be(true) expect(result['Accessories'].include?('Small')).to be(true) end end describe '.colors' do xit 'returns colors' do result = TophatterMerchant::Metadata.colors expect(result.include?('Red')).to be(true) end end describe '.countries' do xit 'returns countries' do result = TophatterMerchant::Metadata.countries expect(result.include?('United States')).to be(true) end end describe '.country_codes' do xit 'returns country codes' do result = TophatterMerchant::Metadata.country_codes expect(result.key?('United States')).to be(true) expect(result['United States']).to eq('USA') end end describe '.states' do xit 'returns states' do result = TophatterMerchant::Metadata.states expect(result.key?('California')).to be(true) expect(result['California']).to eq('CA') end end describe '.provinces' do xit 'returns provinces' do result = TophatterMerchant::Metadata.provinces expect(result.key?('Alberta')).to be(true) expect(result['Alberta']).to eq('AB') end end describe '.territories' do xit 'returns territories' do result = TophatterMerchant::Metadata.territories expect(result.key?('New South Wales')).to be(true) expect(result['New South Wales']).to eq('NSW') end end describe '.carriers' do xit 'returns carriers' do result = TophatterMerchant::Metadata.carriers expect(result.key?('USPS')).to be(true) end end end