Sha256: 776c74389ff78221a9f06aae81ccae8b64cb7d70c3e52e57c70f79c8a8ba81c2

Contents?: true

Size: 703 Bytes

Versions: 42

Compression:

Stored size: 703 Bytes

Contents

require 'spec_helper'

RSpec.describe ActiveFedora::CleanConnection do
  subject { ActiveFedora.fedora.clean_connection }
  describe "#get" do
    context "when given an existing resource uri" do
      let(:uri) { asset.rdf_subject }
      let(:asset) do
        ActiveFedora::Base.create do |a|
          a.resource << [a.rdf_subject, RDF::Vocab::DC.title, "test"]
        end
      end
      let(:result) { subject.get(uri) }
      it "returns a clean graph" do
        graph = result.graph
        expect(graph.statements.to_a.length).to eq 1
        expect(graph.statements.to_a.first).to contain_exactly asset.rdf_subject, RDF::Vocab::DC.title, RDF::Literal.new("test")
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
active-fedora-12.2.4 spec/integration/clean_connection_spec.rb
active-fedora-12.2.3 spec/integration/clean_connection_spec.rb
active-fedora-11.5.6 spec/integration/clean_connection_spec.rb
active-fedora-12.2.2 spec/integration/clean_connection_spec.rb
active-fedora-11.2.1 spec/integration/clean_connection_spec.rb
active-fedora-12.2.1 spec/integration/clean_connection_spec.rb
active-fedora-12.0.3 spec/integration/clean_connection_spec.rb
active-fedora-11.5.5 spec/integration/clean_connection_spec.rb
active-fedora-13.1.2 spec/integration/clean_connection_spec.rb
active-fedora-13.1.1 spec/integration/clean_connection_spec.rb
active-fedora-13.1.0 spec/integration/clean_connection_spec.rb
active-fedora-13.0.0 spec/integration/clean_connection_spec.rb
active-fedora-12.1.1 spec/integration/clean_connection_spec.rb
active-fedora-12.1.0 spec/integration/clean_connection_spec.rb
active-fedora-11.5.4 spec/integration/clean_connection_spec.rb
active-fedora-11.5.3 spec/integration/clean_connection_spec.rb
active-fedora-12.0.2 spec/integration/clean_connection_spec.rb
active-fedora-12.0.1 spec/integration/clean_connection_spec.rb
active-fedora-11.5.2 spec/integration/clean_connection_spec.rb
active-fedora-12.0.0 spec/integration/clean_connection_spec.rb