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-9.10.1 spec/integration/clean_connection_spec.rb
active-fedora-9.10.0 spec/integration/clean_connection_spec.rb
active-fedora-9.10.0.pre2 spec/integration/clean_connection_spec.rb
active-fedora-9.10.0.pre1 spec/integration/clean_connection_spec.rb
active-fedora-9.9.1 spec/integration/clean_connection_spec.rb
active-fedora-9.9.0 spec/integration/clean_connection_spec.rb
active-fedora-9.8.2 spec/integration/clean_connection_spec.rb
active-fedora-9.8.1 spec/integration/clean_connection_spec.rb
active-fedora-9.8.0 spec/integration/clean_connection_spec.rb
active-fedora-9.7.1 spec/integration/clean_connection_spec.rb
active-fedora-9.7.0 spec/integration/clean_connection_spec.rb