Sha256: 2eb1dc5150bb7189390c417882cc8796f3c71830a891eb0cd835d7b669cae171

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

require 'spec_helper'

RSpec.describe ActiveFedora::Core::FedoraIdTranslator do
  describe ".call" do
    let(:result) { described_class.call(id) }
    context "when given an id" do
      let(:good_uri) { ActiveFedora.fedora.host + ActiveFedora.fedora.base_path + "/banana" }
      let(:id) { "banana" }
      it "returns a fedora URI" do
        expect(result).to eq good_uri
      end
      context "when given an id with a leading slash" do
        let(:id) { "/banana" }
        it "returns a good fedora URI" do
          expect(result).to eq good_uri
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active-fedora-9.6.1 spec/unit/core/fedora_id_translator_spec.rb