Sha256: 7c97c8b4164dc01259837b75bd857cc852bd89bda4ddecd201c3b88800d441b7

Contents?: true

Size: 563 Bytes

Versions: 11

Compression:

Stored size: 563 Bytes

Contents

require "spec_helper"

describe Alephant::Broker::LoadStrategy::S3::Archived do
  subject { described_class.new }

  describe "#s3_path" do
    let(:id) { 42 }
    let(:component_meta) { double(:id => id) }

    specify do
      expect(subject.s3_path(component_meta)).to eq id
    end

    context "no location associated with component meta" do
      let(:component_meta) { double(:id => nil) }

      specify do
        expect do
          subject.s3_path component_meta
        end.to raise_error Alephant::Broker::InvalidCacheKey
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
alephant-broker-3.19.1 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.19.0 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.18.0 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.17.0 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.16.2 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.16.1 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.16.0 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.15.2 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.15.1 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.15.0 spec/alephant/broker/load_strategy/s3/archived_spec.rb
alephant-broker-3.14.0 spec/alephant/broker/load_strategy/s3/archived_spec.rb