Sha256: eca7dde6fbc0879db8a1b0e02f4bc99787ca1b68012c89ef017ed4cbf72bbe53

Contents?: true

Size: 594 Bytes

Versions: 15

Compression:

Stored size: 594 Bytes

Contents

require 'spec_helper'

RSpec.describe ActiveFedora::Core::FedoraUriTranslator do
  describe ".call" do
    let(:result) { described_class.call(uri) }
    context "when given a Fedora URI" do
      let(:uri) { ActiveFedora.fedora.host + ActiveFedora.fedora.base_path+"/6" }
      it "should return the id" do
        expect(result).to eq '6'
      end
    end
    context "when given a URI missing a slash" do
      let(:uri) { ActiveFedora.fedora.host + ActiveFedora.fedora.base_path+"602-a" }
      it "should return the id" do
        expect(result).to eq "602-a"
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
active-fedora-9.0.8 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.5.0 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.4.3 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.4.2 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.4.1 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.4.0 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.3.0 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.2.1 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.2.0 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.2.0.rc2 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.2.0.rc1 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.1.2 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.1.1 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.1.0 spec/unit/core/fedora_uri_translator_spec.rb
active-fedora-9.1.0.rc1 spec/unit/core/fedora_uri_translator_spec.rb