active-fedora 4.0.0.rc1 → 4.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -11
- data/History.txt +4 -1
- data/active-fedora.gemspec +2 -2
- data/lib/active_fedora/associations/association_collection.rb +1 -1
- data/lib/active_fedora/associations/belongs_to_association.rb +1 -1
- data/lib/active_fedora/associations/has_and_belongs_to_many_association.rb +1 -1
- data/lib/active_fedora/base.rb +10 -6
- data/lib/active_fedora/file_management.rb +1 -1
- data/lib/active_fedora/fixture_loader.rb +1 -1
- data/lib/active_fedora/model.rb +39 -38
- data/lib/active_fedora/nokogiri_datastream.rb +1 -1
- data/lib/active_fedora/persistence.rb +9 -11
- data/lib/active_fedora/predicates.rb +2 -2
- data/lib/active_fedora/rdf_datastream.rb +49 -7
- data/lib/active_fedora/relationships.rb +6 -9
- data/lib/active_fedora/service_definitions.rb +1 -1
- data/lib/active_fedora/solr_service.rb +15 -8
- data/lib/active_fedora/version.rb +1 -1
- data/lib/tasks/active_fedora.rake +3 -5
- data/lib/tasks/active_fedora_dev.rake +2 -1
- data/spec/fixtures/solr_rdf_descMetadata.nt +7 -0
- data/spec/integration/base_file_management_spec.rb +1 -1
- data/spec/integration/base_find_by_fields_spec.rb +16 -14
- data/spec/integration/base_spec.rb +10 -9
- data/spec/integration/datastream_collections_spec.rb +5 -5
- data/spec/integration/datastream_spec.rb +1 -1
- data/spec/integration/full_featured_model_spec.rb +1 -1
- data/spec/integration/model_spec.rb +14 -11
- data/spec/integration/mods_article_integration_spec.rb +2 -2
- data/spec/integration/nokogiri_datastream_spec.rb +1 -1
- data/spec/integration/ntriples_datastream_spec.rb +1 -0
- data/spec/integration/rels_ext_datastream_spec.rb +5 -6
- data/spec/integration/semantic_node_spec.rb +0 -1
- data/spec/integration/solr_service_spec.rb +8 -8
- data/spec/unit/base_extra_spec.rb +47 -7
- data/spec/unit/base_file_management_spec.rb +1 -1
- data/spec/unit/base_spec.rb +44 -15
- data/spec/unit/model_spec.rb +16 -29
- data/spec/unit/ntriples_datastream_spec.rb +152 -1
- data/spec/unit/relationships_spec.rb +16 -18
- data/spec/unit/solr_config_options_spec.rb +1 -3
- data/spec/unit/solr_service_spec.rb +12 -24
- metadata +68 -86
- data/spec/integration/base_loader_spec.rb +0 -40
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'active_fedora'
|
3
|
-
require 'active_fedora/base'
|
4
|
-
require 'active_fedora/metadata_datastream'
|
5
|
-
require 'nokogiri'
|
6
|
-
|
7
|
-
# Load Sample OralHistory Model
|
8
|
-
require File.join( File.dirname(__FILE__), "..","samples","oral_history_sample_model" )
|
9
|
-
|
10
|
-
|
11
|
-
describe ActiveFedora::Base do
|
12
|
-
|
13
|
-
before(:all) do
|
14
|
-
ActiveFedora::SolrService.register(ActiveFedora.solr_config[:url])
|
15
|
-
end
|
16
|
-
|
17
|
-
before(:each) do
|
18
|
-
@test_object = OralHistorySampleModel.new
|
19
|
-
@test_object.save
|
20
|
-
end
|
21
|
-
|
22
|
-
after(:each) do
|
23
|
-
@test_object.delete
|
24
|
-
end
|
25
|
-
|
26
|
-
describe "load_instance" do
|
27
|
-
it "should retain all datastream attributes pulled from fedora" do
|
28
|
-
raw_object = ActiveFedora::Base.find(@test_object.pid)
|
29
|
-
loaded = OralHistorySampleModel.load_instance(@test_object.pid)
|
30
|
-
raw_datastreams = raw_object.datastreams
|
31
|
-
loaded_datastreams = loaded.datastreams
|
32
|
-
raw_datastreams.each_pair do |k,v|
|
33
|
-
v.dsid.should == loaded_datastreams[k].dsid
|
34
|
-
v.dsLabel.should == loaded_datastreams[k].dsLabel
|
35
|
-
v.mimeType.should == loaded_datastreams[k].mimeType
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|