Sha256: ec5708b2518555d3267f53872a92a797835dd4b038dcb66023a35c365ddec215

Contents?: true

Size: 658 Bytes

Versions: 65

Compression:

Stored size: 658 Bytes

Contents

require "spec_helper"

describe Brightbox::CollaboratingAccount do
  include_context "collaborating accounts"

  let(:account) { Brightbox::CollaboratingAccount.new(initial_model) }

  describe "#name" do
    context "when initialised with an account" do
      let(:initial_model) { owned_account }

      it "returns account's name" do
        expect(account.name).to eql("Owned account name")
      end
    end

    context "when initialised with a collaboration" do
      let(:initial_model) { active_collaboration }

      it "returns nested account's name" do
        expect(account.name).to eql("Active collaboration name")
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
brightbox-cli-2.4.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.3.4 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.3.3 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.3.2 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.3.1 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.3.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.2.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.1.2 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.1.1 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.1.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-2.0.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.6.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.5.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.4.3 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.4.2 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.4.1 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.4.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.3.0 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.2.2 spec/unit/brightbox/collaborating_account/name_spec.rb
brightbox-cli-1.2.1 spec/unit/brightbox/collaborating_account/name_spec.rb