Sha256: 6364c570d792142fef3544d65acf1872c05ef7c6e7f536301398c8660c8f163f

Contents?: true

Size: 674 Bytes

Versions: 31

Compression:

Stored size: 674 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 eq [asset.rdf_subject, RDF::Vocab::DC.title, "test"]
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
active-fedora-10.3.0 spec/integration/clean_connection_spec.rb
active-fedora-9.7.3 spec/integration/clean_connection_spec.rb
active-fedora-10.3.0.rc2 spec/integration/clean_connection_spec.rb
active-fedora-10.3.0.rc1 spec/integration/clean_connection_spec.rb
active-fedora-10.2.1 spec/integration/clean_connection_spec.rb
active-fedora-10.2.0 spec/integration/clean_connection_spec.rb
active-fedora-10.1.0 spec/integration/clean_connection_spec.rb
active-fedora-10.1.0.rc1 spec/integration/clean_connection_spec.rb
active-fedora-9.7.2 spec/integration/clean_connection_spec.rb
active-fedora-10.0.0 spec/integration/clean_connection_spec.rb
active-fedora-10.0.0.beta4 spec/integration/clean_connection_spec.rb
active-fedora-10.0.0.beta3 spec/integration/clean_connection_spec.rb
active-fedora-10.0.0.beta2 spec/integration/clean_connection_spec.rb
active-fedora-10.0.0.beta1 spec/integration/clean_connection_spec.rb
active-fedora-9.13.0 spec/integration/clean_connection_spec.rb
active-fedora-9.12.0 spec/integration/clean_connection_spec.rb
active-fedora-9.11.0 spec/integration/clean_connection_spec.rb
active-fedora-9.10.4 spec/integration/clean_connection_spec.rb
active-fedora-9.10.3 spec/integration/clean_connection_spec.rb
active-fedora-9.10.2 spec/integration/clean_connection_spec.rb