Sha256: d48e7ba5615c9e0416f7098fffc85da046ac17a7bbf0b00d8514320a2ef04625

Contents?: true

Size: 998 Bytes

Versions: 1

Compression:

Stored size: 998 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 ".time_of_uses" do

        use_vcr_cassette "time_of_uses"

        it "should return an the time of uses for a given LSE and touGroupId" do
          time_of_uses = @client.time_of_uses(2756, 1)
          time_of_uses.should be_an Hashie::Mash
          time_of_uses.time_of_uses.count.should == 2
        end

      end

      context ".time_of_use" do

        use_vcr_cassette "time_of_use"

        it "should return a territory" do
          intervals = @client.time_of_use_intervals(2756, 1)
          intervals.should be_an Array
          intervals.first.tou_group_id.should == 1
        end

      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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