Sha256: 020910102986524d0a4378e0f991f30e09813543f757d8dc4b21669535575ee1
Contents?: true
Size: 1.36 KB
Versions: 18
Compression:
Stored size: 1.36 KB
Contents
require "spec_helper" describe Brightbox::Account do before do # Unfortunately need to change $config for Api.conn to work until we can # eliminate the global class method $config = config_from_contents(contents) end describe ".all" do context "when connected using an application", :vcr do let(:contents) { USER_APP_CONFIG_CONTENTS } it "returns a collection of Accounts" do expect(Brightbox::Account.all).to be_kind_of(Array) Brightbox::Account.all.each do |account| expect(account).to be_kind_of(Fog::Compute::Brightbox::Account) end end it "returns resources on the same connection" do Brightbox::Account.all.each do |account| expect(account.service).to eql(Brightbox::Account.conn) end end end context "when connected using an client", :vcr do let(:contents) { API_CLIENT_CONFIG_CONTENTS } it "returns a collection of Accounts" do expect(Brightbox::Account.all).to be_kind_of(Array) Brightbox::Account.all.each do |account| expect(account).to be_kind_of(Fog::Compute::Brightbox::Account) end end it "returns resources on the same connection" do Brightbox::Account.all.each do |account| expect(account.service).to eql(Brightbox::Account.conn) end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems