Sha256: 93672027986b588ec1736b8db226dc1cbac6447695e2615eee2d482bb7939e49

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

require "spec_helper"

describe SauceWhisk::Account do
  describe "##new" do
    it "sets any options passed in as a hash" do
      options = {
          :access_key => 12345,
          :minutes => 23,
          :mac_minutes => 11,
          :manual_minutes => 4,
          :mac_manual_minutes => 87,
          :id => "someone"
      }

      test_account = SauceWhisk::Account.new options
      test_account.access_key.should eq 12345
      test_account.minutes.should eq 23
      test_account.mac_minutes.should eq 11
      test_account.manual_minutes.should eq 4
      test_account.mac_manual_minutes.should eq 87
      test_account.username.should eq "someone"
    end

    it "sets concurrency figures" do
      concurrencies = {
          :mac_concurrency => 23,
          :total_concurrency => 100
      }

      test_account = SauceWhisk::Account.new concurrencies
      test_account.mac_concurrency.should eq 23
      test_account.total_concurrency.should eq 100
    end
  end

  describe "#add_subaccount", :vcr => {:cassette_name => "accounts"} do
    let(:parent) {SauceWhisk::Account.new(:access_key => 12345, :minutes => 23, :id => ENV["SAUCE_USERNAME"])}

    it "creates a subaccount" do
      subaccount = parent.add_subaccount("Manny", "newsub77", "Manny@blackbooks.co.uk", "davesdisease")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sauce_whisk-0.0.13 spec/lib/sauce_whisk/account_spec.rb
sauce_whisk-0.0.12 spec/lib/sauce_whisk/account_spec.rb