Sha256: be253a9b0b01afcde784c77ecfe8c128ecd5ba05786b5a3a96175f44de1b59b1

Contents?: true

Size: 478 Bytes

Versions: 5

Compression:

Stored size: 478 Bytes

Contents

require 'spec_helper'

describe ActiveFedora::FilePathBuilder do
  describe ".build" do
    let(:parent) { ActiveFedora::Base.new(id: '1234') }
    subject { described_class.build(parent, nil, 'FOO') }

    it { is_expected.to eq 'FOO1' }

    context "when some datastreams exist" do
      before do
        allow(parent).to receive(:attached_files).and_return('FOO56' => instance_double(ActiveFedora::File))
      end

      it { is_expected.to eq 'FOO57' }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active-fedora-11.1.4 spec/unit/file_path_builder_spec.rb
active-fedora-11.1.3 spec/unit/file_path_builder_spec.rb
active-fedora-11.1.2 spec/unit/file_path_builder_spec.rb
active-fedora-11.1.1 spec/unit/file_path_builder_spec.rb
active-fedora-11.1.0 spec/unit/file_path_builder_spec.rb