Sha256: e83ed23a3f437c768e4e46acee687915b7b70da22b190e6ddfba290e3bf80048
Contents?: true
Size: 1.26 KB
Versions: 23
Compression:
Stored size: 1.26 KB
Contents
require "spec_helper" describe Brightbox::Account do before do Brightbox.config = config_from_contents(contents) end describe ".all" do context "when connected using an application", vcr: true 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::Brightbox::Compute::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: true 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::Brightbox::Compute::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
23 entries across 23 versions & 1 rubygems