Sha256: 008b85f1d8fb4352da22000fe0b232e93a92b1cbf0681477845ccf4ed47cfaec

Contents?: true

Size: 666 Bytes

Versions: 14

Compression:

Stored size: 666 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::DC.title, "test"]
        end
      end
      let(:result) { subject.get(uri) }
      it "should return 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::DC.title, "test"]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
active-fedora-9.5.0 spec/integration/clean_connection_spec.rb
active-fedora-9.4.3 spec/integration/clean_connection_spec.rb
active-fedora-9.4.2 spec/integration/clean_connection_spec.rb
active-fedora-9.4.1 spec/integration/clean_connection_spec.rb
active-fedora-9.4.0 spec/integration/clean_connection_spec.rb
active-fedora-9.3.0 spec/integration/clean_connection_spec.rb
active-fedora-9.2.1 spec/integration/clean_connection_spec.rb
active-fedora-9.2.0 spec/integration/clean_connection_spec.rb
active-fedora-9.2.0.rc2 spec/integration/clean_connection_spec.rb
active-fedora-9.2.0.rc1 spec/integration/clean_connection_spec.rb
active-fedora-9.1.2 spec/integration/clean_connection_spec.rb
active-fedora-9.1.1 spec/integration/clean_connection_spec.rb
active-fedora-9.1.0 spec/integration/clean_connection_spec.rb
active-fedora-9.1.0.rc1 spec/integration/clean_connection_spec.rb