Sha256: a80ea82712391d089089bfd6f0e511559db8b721243729c70f45f2bfeb8355fd

Contents?: true

Size: 544 Bytes

Versions: 3

Compression:

Stored size: 544 Bytes

Contents

require 'spec_helper'

describe Squall::Statistic do
  before(:each) do
    default_config
    @statistic = Squall::Statistic.new
  end

  describe "#usage_statistic" do
    use_vcr_cassette "statistic/usage_statistics"

    it "requires an id" do
      expect { @statistic.daily_stats }.to raise_error(ArgumentError)
      @statistic.success.should be_false
    end

    it "returns the daily statistics" do
      result = @statistic.daily_stats(1)
      result['id'].to_i.should == 1
      result['cost'].to_f.should == 0.0
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
squall-1.0.2 spec/squall/statistic_spec.rb
squall-1.0.1 spec/squall/statistic_spec.rb
squall-1.0.0 spec/squall/statistic_spec.rb