Sha256: 3171d844364b314bc59dd4de9771f46b4b859de3a70c13c3255297db0143ee0c

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

require File.expand_path('../../spec_helper', __FILE__)

describe Genability::Client do

  Genability::Configuration::VALID_FORMATS.each do |format|

    context ".new(:format => '#{format}')" do

      before(:all) do
        @options = {:format => format}.merge(configuration_defaults)
        @client = Genability::Client.new(@options)
      end

      context ".territories" do

        use_vcr_cassette "territories"

        it "should return an array of territories" do
          territories = @client.territories(:lse_id => 734)
          territories.should be_an Array
          territories.first.territory_id.should == 807
        end

      end

      context ".territory" do

        use_vcr_cassette "territory"

        it "should return a territory" do
          @client.territory(3539).lse_id.should == 734
        end

      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
genability-0.1.0 spec/client/territory_spec.rb