Sha256: 811b5d30134922239e514861eb0bd74c69f66412699858bd46bdd3a482e75b24
Contents?: true
Size: 1.79 KB
Versions: 24
Compression:
Stored size: 1.79 KB
Contents
require "spec_helper" describe Brightbox::Account do before do skip "recordings corrupted and no longer working" end describe ".get" do context "when connected using an application" do before do Brightbox::Api.configuration = USER_APP_CONFIG end context "and the account is accessible", vcr: true do before do @account_id = "acc-12345" @account = Brightbox::Account.get(@account_id) end it "returns requested account" do expect(@account).to be_kind_of(Fog::Compute::Brightbox::Account) expect(@account.id).to eql(@account_id) end it "returns the resource on the same connection" do expect(@account.service).to eql(Brightbox::Account.conn) end end context "and the account is unknown", vcr: true do it "returns nil" do expect(Brightbox::Account.get("acc-xxxxx")).to be_nil end end end context "when connected using an client", vcr: true do before do Brightbox::Api.configuration = API_CLIENT_CONFIG end context "and the account is accessible", vcr: true do before do @account_id = "acc-12345" @account = Brightbox::Account.get(@account_id) end it "returns the client's owning account" do expect(@account).to be_kind_of(Fog::Compute::Brightbox::Account) expect(@account.id).to eql(@account_id) end it "returns the resource on the same connection" do expect(@account.service).to eql(Brightbox::Account.conn) end end context "and the account is unknown", vcr: true do it "returns nil" do expect(Brightbox::Account.get("acc-xxxxx")).to be_nil end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems