Sha256: dfc633ec4f44698804a02b0afedaa84a9a0d8589987e93870993c6b4a5caabc3
Contents?: true
Size: 688 Bytes
Versions: 2
Compression:
Stored size: 688 Bytes
Contents
require 'spec_helper' describe ActiveFedora::LoadableFromJson::SolrBackedResource do before do class Foo < ActiveFedora::Base belongs_to :bar, predicate: ::RDF::DC.extent end class Bar < ActiveFedora::Base end end after do Object.send(:remove_const, :Foo) Object.send(:remove_const, :Bar) end let(:resource) { described_class.new(Foo) } before do resource.insert [nil, ::RDF::DC.extent, RDF::URI('http://example.org/123')] end describe "#query" do subject { resource.query(predicate: ::RDF::DC.extent) } it "is enumerable" do expect(subject.map(&:object)).to eq [RDF::URI('http://example.org/123')] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active-fedora-9.6.2 | spec/unit/loadable_from_json_spec.rb |
active-fedora-9.6.1 | spec/unit/loadable_from_json_spec.rb |