active-fedora 8.7.0 → 9.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +8 -15
- data/Gemfile +5 -5
- data/History.txt +0 -80
- data/README.md +1 -0
- data/Rakefile +0 -3
- data/active-fedora.gemspec +8 -7
- data/config/fedora.yml +5 -4
- data/config/predicate_mappings.yml +5 -5
- data/gemfiles/rails4.1.gemfile +10 -0
- data/gemfiles/rails4.2.beta.gemfile +10 -0
- data/lib/active_fedora.rb +151 -117
- data/lib/active_fedora/associations.rb +47 -15
- data/lib/active_fedora/associations/association.rb +29 -8
- data/lib/active_fedora/associations/association_scope.rb +5 -5
- data/lib/active_fedora/associations/belongs_to_association.rb +20 -63
- data/lib/active_fedora/associations/builder/association.rb +61 -25
- data/lib/active_fedora/associations/builder/belongs_to.rb +7 -94
- data/lib/active_fedora/associations/builder/collection_association.rb +11 -43
- data/lib/active_fedora/associations/builder/contains.rb +28 -0
- data/lib/active_fedora/associations/builder/has_and_belongs_to_many.rb +13 -3
- data/lib/active_fedora/associations/builder/has_many.rb +16 -10
- data/lib/active_fedora/associations/builder/property.rb +14 -0
- data/lib/active_fedora/associations/builder/singular_association.rb +14 -18
- data/lib/active_fedora/associations/builder/singular_property.rb +12 -0
- data/lib/active_fedora/associations/collection_association.rb +57 -80
- data/lib/active_fedora/associations/contains_association.rb +50 -0
- data/lib/active_fedora/associations/has_and_belongs_to_many_association.rb +44 -24
- data/lib/active_fedora/associations/has_many_association.rb +46 -14
- data/lib/active_fedora/associations/rdf.rb +86 -0
- data/lib/active_fedora/associations/singular_association.rb +4 -8
- data/lib/active_fedora/associations/singular_rdf.rb +15 -0
- data/lib/active_fedora/attached_files.rb +195 -0
- data/lib/active_fedora/attribute_methods.rb +122 -0
- data/lib/active_fedora/attribute_methods/dirty.rb +16 -0
- data/lib/active_fedora/attribute_methods/read.rb +61 -0
- data/lib/active_fedora/attribute_methods/write.rb +47 -0
- data/lib/active_fedora/attributes.rb +93 -44
- data/lib/active_fedora/attributes/primary_key.rb +12 -0
- data/lib/active_fedora/autosave_association.rb +2 -2
- data/lib/active_fedora/base.rb +16 -15
- data/lib/active_fedora/callbacks.rb +7 -7
- data/lib/active_fedora/change_set.rb +34 -0
- data/lib/active_fedora/cleaner.rb +62 -0
- data/lib/active_fedora/config.rb +4 -22
- data/lib/active_fedora/core.rb +173 -99
- data/lib/active_fedora/datastream.rb +4 -117
- data/lib/active_fedora/datastreams.rb +2 -263
- data/lib/active_fedora/datastreams/nokogiri_datastreams.rb +28 -51
- data/lib/active_fedora/{datastream_attribute.rb → delegated_attribute.rb} +57 -26
- data/lib/active_fedora/errors.rb +61 -0
- data/lib/active_fedora/fedora.rb +19 -0
- data/lib/active_fedora/fedora_attributes.rb +58 -26
- data/lib/active_fedora/file.rb +318 -0
- data/lib/active_fedora/file_configurator.rb +32 -32
- data/lib/active_fedora/file_path_builder.rb +24 -0
- data/lib/active_fedora/files_hash.rb +82 -0
- data/lib/active_fedora/fixity_service.rb +40 -0
- data/lib/active_fedora/indexing.rb +55 -82
- data/lib/active_fedora/indexing_service.rb +70 -0
- data/lib/active_fedora/ldp_resource.rb +26 -0
- data/lib/active_fedora/loadable_from_json.rb +112 -0
- data/lib/active_fedora/model.rb +5 -19
- data/lib/active_fedora/nested_attributes.rb +5 -6
- data/lib/active_fedora/nom_datastream.rb +15 -25
- data/lib/active_fedora/om_datastream.rb +26 -197
- data/lib/active_fedora/persistence.rb +95 -71
- data/lib/active_fedora/predicates.rb +4 -4
- data/lib/active_fedora/qualified_dublin_core_datastream.rb +17 -18
- data/lib/active_fedora/querying.rb +3 -4
- data/lib/active_fedora/railtie.rb +3 -6
- data/lib/active_fedora/rdf.rb +3 -1
- data/lib/active_fedora/rdf/datastream_indexing.rb +11 -0
- data/lib/active_fedora/rdf/fcrepo.rb +10 -324
- data/lib/active_fedora/rdf/indexing.rb +20 -16
- data/lib/active_fedora/rdf/ldp.rb +6 -0
- data/lib/active_fedora/rdf/ntriples_rdf_datastream.rb +1 -1
- data/lib/active_fedora/rdf/persistence.rb +5 -6
- data/lib/active_fedora/rdf/rdf_datastream.rb +44 -37
- data/lib/active_fedora/rdf/rdfxml_datastream.rb +13 -0
- data/lib/active_fedora/rdf/rels_ext.rb +26 -0
- data/lib/active_fedora/reflection.rb +256 -199
- data/lib/active_fedora/relation.rb +18 -6
- data/lib/active_fedora/relation/finder_methods.rb +69 -38
- data/lib/active_fedora/relation/query_methods.rb +7 -3
- data/lib/active_fedora/rspec_matchers/belong_to_associated_active_fedora_object_matcher.rb +7 -7
- data/lib/active_fedora/rspec_matchers/have_many_associated_active_fedora_objects_matcher.rb +8 -8
- data/lib/active_fedora/rspec_matchers/have_predicate_matcher.rb +9 -11
- data/lib/active_fedora/simple_datastream.rb +18 -13
- data/lib/active_fedora/solr_instance_loader.rb +18 -38
- data/lib/active_fedora/solr_service.rb +37 -20
- data/lib/active_fedora/sparql_insert.rb +45 -0
- data/lib/active_fedora/test_support.rb +1 -22
- data/lib/active_fedora/version.rb +1 -1
- data/lib/active_fedora/versionable.rb +90 -0
- data/lib/active_fedora/with_metadata.rb +37 -0
- data/lib/active_fedora/with_metadata/metadata_node.rb +70 -0
- data/lib/generators/active_fedora/config/config_generator.rb +0 -1
- data/lib/generators/active_fedora/config/solr/solr_generator.rb +1 -1
- data/lib/generators/active_fedora/model/model_generator.rb +5 -5
- data/lib/generators/active_fedora/model/templates/datastream_spec.rb.erb +1 -1
- data/lib/generators/active_fedora/model/templates/model_spec.rb.erb +2 -2
- data/lib/tasks/active_fedora_dev.rake +21 -27
- data/spec/config_helper.rb +1 -1
- data/spec/fixtures/mixed_rdf_descMetadata.nt +6 -6
- data/spec/fixtures/rails_root/config/predicate_mappings.yml +3 -19
- data/spec/fixtures/solr_rdf_descMetadata.nt +6 -6
- data/spec/integration/associations_spec.rb +133 -153
- data/spec/integration/attached_files_spec.rb +164 -0
- data/spec/integration/attributes_spec.rb +73 -12
- data/spec/integration/autosave_association_spec.rb +3 -3
- data/spec/integration/base_spec.rb +57 -351
- data/spec/integration/belongs_to_association_spec.rb +86 -76
- data/spec/integration/bug_spec.rb +3 -3
- data/spec/integration/collection_association_spec.rb +4 -4
- data/spec/integration/complex_rdf_datastream_spec.rb +54 -56
- data/spec/integration/delete_all_spec.rb +18 -15
- data/spec/integration/eradicate_spec.rb +54 -0
- data/spec/integration/fedora_solr_sync_spec.rb +7 -5
- data/spec/integration/field_to_solr_name_spec.rb +5 -5
- data/spec/integration/file_fixity_spec.rb +40 -0
- data/spec/integration/file_spec.rb +122 -0
- data/spec/integration/full_featured_model_spec.rb +53 -63
- data/spec/integration/has_and_belongs_to_many_associations_spec.rb +141 -114
- data/spec/integration/has_many_associations_spec.rb +142 -64
- data/spec/integration/json_serialization_spec.rb +50 -8
- data/spec/integration/model_spec.rb +12 -29
- data/spec/integration/nested_attribute_spec.rb +28 -20
- data/spec/integration/ntriples_datastream_spec.rb +60 -57
- data/spec/integration/om_datastream_spec.rb +51 -140
- data/spec/integration/rdf_nested_attributes_spec.rb +16 -14
- data/spec/integration/relation_delegation_spec.rb +7 -9
- data/spec/integration/relation_spec.rb +9 -7
- data/spec/integration/scoped_query_spec.rb +26 -26
- data/spec/integration/solr_instance_loader_spec.rb +69 -53
- data/spec/integration/solr_service_spec.rb +12 -73
- data/spec/integration/versionable_spec.rb +477 -0
- data/spec/integration/with_metadata_spec.rb +52 -0
- data/spec/samples/hydra-mods_article_datastream.rb +10 -6
- data/spec/samples/models/mods_article.rb +6 -2
- data/spec/samples/oral_history_sample.xml +1 -1
- data/spec/samples/oral_history_xml.xml +1 -1
- data/spec/samples/special_thing.rb +3 -3
- data/spec/spec_helper.rb +22 -12
- data/spec/support/an_active_model.rb +3 -7
- data/spec/unit/active_fedora_spec.rb +20 -17
- data/spec/unit/attached_files_spec.rb +203 -0
- data/spec/unit/attributes_spec.rb +286 -207
- data/spec/unit/base_active_model_spec.rb +8 -8
- data/spec/unit/base_datastream_management_spec.rb +11 -24
- data/spec/unit/base_extra_spec.rb +17 -67
- data/spec/unit/base_spec.rb +163 -428
- data/spec/unit/builder/has_and_belongs_to_many_spec.rb +2 -2
- data/spec/unit/callback_spec.rb +38 -23
- data/spec/unit/change_set_spec.rb +46 -0
- data/spec/unit/code_configurator_spec.rb +5 -5
- data/spec/unit/config_spec.rb +9 -14
- data/spec/unit/core_spec.rb +59 -8
- data/spec/unit/file_configurator_spec.rb +55 -53
- data/spec/unit/file_path_builder_spec.rb +18 -0
- data/spec/unit/file_spec.rb +221 -0
- data/spec/unit/files_hash_spec.rb +53 -0
- data/spec/unit/fixity_service_spec.rb +34 -0
- data/spec/unit/has_and_belongs_to_many_association_spec.rb +134 -0
- data/spec/unit/has_many_association_spec.rb +51 -0
- data/spec/unit/indexing_service_spec.rb +23 -0
- data/spec/unit/indexing_spec.rb +26 -0
- data/spec/unit/inheritance_spec.rb +9 -10
- data/spec/unit/model_spec.rb +15 -33
- data/spec/unit/nom_datastream_spec.rb +13 -10
- data/spec/unit/ntriples_datastream_spec.rb +81 -96
- data/spec/unit/om_datastream_spec.rb +137 -227
- data/spec/unit/persistence_spec.rb +28 -34
- data/spec/unit/predicates_spec.rb +29 -29
- data/spec/unit/property_spec.rb +1 -3
- data/spec/unit/qualified_dublin_core_datastream_spec.rb +27 -32
- data/spec/unit/query_spec.rb +116 -149
- data/spec/unit/rdf_datastream_spec.rb +25 -43
- data/spec/unit/rdf_resource_datastream_spec.rb +24 -123
- data/spec/unit/{rdfxml_rdf_datastream_spec.rb → rdfxml_datastream_spec.rb} +21 -25
- data/spec/unit/readonly_spec.rb +23 -0
- data/spec/unit/rspec_matchers/belong_to_associated_active_fedora_object_matcher_spec.rb +6 -6
- data/spec/unit/rspec_matchers/have_many_associated_active_fedora_objects_matcher_spec.rb +6 -6
- data/spec/unit/rspec_matchers/have_predicate_matcher_spec.rb +6 -6
- data/spec/unit/serializers_spec.rb +1 -1
- data/spec/unit/simple_datastream_spec.rb +12 -23
- data/spec/unit/solr_config_options_spec.rb +14 -17
- data/spec/unit/solr_service_spec.rb +38 -77
- data/spec/unit/sparql_insert_spec.rb +32 -0
- data/spec/unit/validations_spec.rb +8 -11
- metadata +96 -121
- data/lib/active_fedora/auditable.rb +0 -9
- data/lib/active_fedora/content_model.rb +0 -70
- data/lib/active_fedora/datastream_collections.rb +0 -302
- data/lib/active_fedora/datastream_hash.rb +0 -35
- data/lib/active_fedora/digital_object.rb +0 -55
- data/lib/active_fedora/fixture_exporter.rb +0 -33
- data/lib/active_fedora/fixture_loader.rb +0 -48
- data/lib/active_fedora/rdf/identifiable.rb +0 -66
- data/lib/active_fedora/rdf/project_hydra.rb +0 -12
- data/lib/active_fedora/rdf/rdfxml_rdf_datastream.rb +0 -13
- data/lib/active_fedora/rdf_xml_writer.rb +0 -49
- data/lib/active_fedora/relationship_graph.rb +0 -101
- data/lib/active_fedora/reload_on_save.rb +0 -16
- data/lib/active_fedora/rels_ext_datastream.rb +0 -100
- data/lib/active_fedora/rspec_matchers/match_fedora_datastream_matcher.rb +0 -41
- data/lib/active_fedora/rubydora_connection.rb +0 -35
- data/lib/active_fedora/semantic_node.rb +0 -164
- data/lib/active_fedora/service_definitions.rb +0 -88
- data/lib/active_fedora/sharding.rb +0 -58
- data/lib/active_fedora/solr_digital_object.rb +0 -68
- data/lib/active_fedora/unsaved_digital_object.rb +0 -58
- data/lib/generators/active_fedora/config/fedora/fedora_generator.rb +0 -12
- data/lib/generators/active_fedora/config/fedora/templates/fedora.yml +0 -38
- data/lib/generators/active_fedora/config/fedora/templates/fedora_conf/conf/development/fedora.fcfg +0 -953
- data/lib/generators/active_fedora/config/fedora/templates/fedora_conf/conf/test/fedora.fcfg +0 -953
- data/lib/tasks/active_fedora.rake +0 -83
- data/spec/fixtures/sharded_fedora.yml +0 -11
- data/spec/integration/auditable_spec.rb +0 -29
- data/spec/integration/datastream_collections_spec.rb +0 -127
- data/spec/integration/datastream_spec.rb +0 -90
- data/spec/integration/datastreams_spec.rb +0 -173
- data/spec/integration/load_from_solr_spec.rb +0 -66
- data/spec/integration/rels_ext_datastream_spec.rb +0 -82
- data/spec/support/mock_fedora.rb +0 -44
- data/spec/unit/content_model_spec.rb +0 -86
- data/spec/unit/datastream_collections_spec.rb +0 -420
- data/spec/unit/datastream_spec.rb +0 -83
- data/spec/unit/datastreams_spec.rb +0 -243
- data/spec/unit/has_and_belongs_to_many_collection_spec.rb +0 -96
- data/spec/unit/has_many_collection_spec.rb +0 -35
- data/spec/unit/rdf_vocab_spec.rb +0 -30
- data/spec/unit/rdf_xml_writer_spec.rb +0 -63
- data/spec/unit/relationship_graph_spec.rb +0 -115
- data/spec/unit/reload_on_save_spec.rb +0 -24
- data/spec/unit/rels_ext_datastream_spec.rb +0 -170
- data/spec/unit/rspec_matchers/match_fedora_datastream_matcher_spec.rb +0 -44
- data/spec/unit/rubydora_connection_spec.rb +0 -12
- data/spec/unit/semantic_node_spec.rb +0 -112
- data/spec/unit/service_definitions_spec.rb +0 -63
- data/spec/unit/solr_digital_object_spec.rb +0 -97
- data/spec/unit/unsaved_digital_object_spec.rb +0 -48
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ActiveFedora::Associations::HasManyAssociation do
|
4
|
+
before do
|
5
|
+
class Book < ActiveFedora::Base
|
6
|
+
end
|
7
|
+
class Page < ActiveFedora::Base
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
after do
|
12
|
+
Object.send(:remove_const, :Book)
|
13
|
+
Object.send(:remove_const, :Page)
|
14
|
+
end
|
15
|
+
let(:book) { Book.new('subject-a') }
|
16
|
+
let(:page) { Page.new('object-b') }
|
17
|
+
|
18
|
+
describe "setting the foreign key" do
|
19
|
+
before do
|
20
|
+
allow(book).to receive(:new_record?).and_return(false)
|
21
|
+
allow(page).to receive(:save).and_return(true)
|
22
|
+
allow(ActiveFedora::SolrService).to receive(:query).and_return([])
|
23
|
+
end
|
24
|
+
|
25
|
+
let(:reflection) { Book.create_reflection(:has_many, 'pages', { predicate: ActiveFedora::RDF::RelsExt.isPartOf }, Book) }
|
26
|
+
let(:association) { ActiveFedora::Associations::HasManyAssociation.new(book, reflection) }
|
27
|
+
|
28
|
+
it "should set the book_id attribute" do
|
29
|
+
expect(association).to receive(:callback).twice
|
30
|
+
expect(page).to receive(:[]=).with('book_id', book.id)
|
31
|
+
association.concat page
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "Finding a polymorphic inverse relation" do
|
36
|
+
|
37
|
+
before do
|
38
|
+
# :books must come first, so that we can test that is being passed over in favor of :contents
|
39
|
+
Page.has_many :books, predicate: ActiveFedora::RDF::RelsExt.isPartOf, class_name: 'ActiveFedora::Base'
|
40
|
+
Page.has_and_belongs_to_many :contents, predicate: ActiveFedora::RDF::RelsExt.isPartOf, class_name: 'ActiveFedora::Base'
|
41
|
+
end
|
42
|
+
let(:book_reflection) { Book.create_reflection(:has_many, 'pages', { predicate: ActiveFedora::RDF::RelsExt.isPartOf }, Book) }
|
43
|
+
let(:association) { ActiveFedora::Associations::HasManyAssociation.new(book, book_reflection) }
|
44
|
+
|
45
|
+
subject { association.send(:find_polymorphic_inverse, page) }
|
46
|
+
|
47
|
+
it "should find the HABTM reflection" do
|
48
|
+
expect(subject.name).to eq :contents
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ActiveFedora::IndexingService do
|
4
|
+
let(:indexer) { described_class.new(object) }
|
5
|
+
let(:object) { ActiveFedora::Base.new }
|
6
|
+
|
7
|
+
subject { indexer.send(:solrize_relationships) }
|
8
|
+
|
9
|
+
describe "#solrize_relationships" do
|
10
|
+
let(:person_reflection) { double('person', foreign_key: 'person_id', kind_of?: true, solr_key: 'http://fedora.info/definitions/v4/rels-ext#isMemberOf_ssim') }
|
11
|
+
let(:location_reflection) { double('location', foreign_key: 'location_id', kind_of?: true, solr_key: 'http://fedora.info/definitions/v4/rels-ext#isPartOf_ssim') }
|
12
|
+
let(:reflections) { { 'person' => person_reflection, 'location' => location_reflection } }
|
13
|
+
|
14
|
+
it "should serialize the relationships into a Hash" do
|
15
|
+
expect(object).to receive(:[]).with('person_id').and_return('info:fedora/demo:10')
|
16
|
+
expect(object).to receive(:[]).with('location_id').and_return('info:fedora/demo:11')
|
17
|
+
expect(object.class).to receive(:reflections).and_return(reflections)
|
18
|
+
expect(subject[ActiveFedora::SolrService.solr_name("http://fedora.info/definitions/v4/rels-ext#isMemberOf", :symbol)]).to eq "info:fedora/demo:10"
|
19
|
+
expect(subject[ActiveFedora::SolrService.solr_name("http://fedora.info/definitions/v4/rels-ext#isPartOf", :symbol)]).to eq "info:fedora/demo:11"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ActiveFedora::Indexing do
|
4
|
+
context "internal methods" do
|
5
|
+
before :all do
|
6
|
+
class SpecNode
|
7
|
+
include ActiveFedora::Indexing
|
8
|
+
end
|
9
|
+
end
|
10
|
+
after :all do
|
11
|
+
Object.send(:remove_const, :SpecNode)
|
12
|
+
end
|
13
|
+
|
14
|
+
subject { SpecNode.new }
|
15
|
+
|
16
|
+
describe "#create_needs_index?" do
|
17
|
+
subject { SpecNode.new.send(:create_needs_index?) }
|
18
|
+
it { should be true }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "#update_needs_index?" do
|
22
|
+
subject { SpecNode.new.send(:update_needs_index?) }
|
23
|
+
it { should be true }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe ActiveFedora::Base do
|
4
|
-
before
|
4
|
+
before do
|
5
5
|
class Foo < ActiveFedora::Base
|
6
|
-
has_metadata :
|
6
|
+
has_metadata "foostream", type: ActiveFedora::SimpleDatastream do |m|
|
7
7
|
m.field "foostream", :string
|
8
8
|
end
|
9
|
-
has_metadata :
|
9
|
+
has_metadata 'dcstream', type: ActiveFedora::QualifiedDublinCoreDatastream
|
10
10
|
end
|
11
11
|
class Bar < ActiveFedora::Base
|
12
|
-
has_metadata :
|
12
|
+
has_metadata 'barstream', type: ActiveFedora::SimpleDatastream do |m|
|
13
13
|
m.field "barfield", :string
|
14
14
|
end
|
15
15
|
end
|
@@ -17,17 +17,16 @@ describe ActiveFedora::Base do
|
|
17
17
|
|
18
18
|
it "doesn't overwrite stream specs" do
|
19
19
|
f = Foo.new
|
20
|
-
expect(f.
|
21
|
-
streams = f.
|
22
|
-
expect(streams.pop).to eq
|
23
|
-
expect(streams.pop).to eq
|
24
|
-
expect(streams.pop).to eq("ActiveFedora::QualifiedDublinCoreDatastream")
|
20
|
+
expect(f.attached_files.size).to eq 2
|
21
|
+
streams = f.attached_files.values.map{|x| x.class.to_s}.sort
|
22
|
+
expect(streams.pop).to eq "ActiveFedora::SimpleDatastream"
|
23
|
+
expect(streams.pop).to eq "ActiveFedora::QualifiedDublinCoreDatastream"
|
25
24
|
end
|
26
25
|
|
27
26
|
it "should work for multiple types" do
|
28
27
|
b = Foo.new
|
29
28
|
f = Bar.new
|
30
|
-
expect(b.class.ds_specs).
|
29
|
+
expect(b.class.ds_specs).to_not eq f.class.ds_specs
|
31
30
|
end
|
32
31
|
after do
|
33
32
|
Object.send(:remove_const, :Bar)
|
data/spec/unit/model_spec.rb
CHANGED
@@ -7,7 +7,6 @@ describe ActiveFedora::Model do
|
|
7
7
|
class Basic < ActiveFedora::Base
|
8
8
|
end
|
9
9
|
end
|
10
|
-
@model_query = "has_model_s:#{solr_uri("info:fedora/afmodel:SpecModel_Basic")}"
|
11
10
|
end
|
12
11
|
|
13
12
|
after(:all) do
|
@@ -15,44 +14,27 @@ describe ActiveFedora::Model do
|
|
15
14
|
end
|
16
15
|
|
17
16
|
describe '.solr_query_handler' do
|
17
|
+
subject { SpecModel::Basic.solr_query_handler }
|
18
18
|
after do
|
19
19
|
# reset to default
|
20
20
|
SpecModel::Basic.solr_query_handler = 'standard'
|
21
21
|
end
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
SpecModel::Basic.solr_query_handler = 'search'
|
27
|
-
|
22
|
+
|
23
|
+
it { should eq 'standard' }
|
24
|
+
|
25
|
+
context "when setting to something besides the default" do
|
26
|
+
before { SpecModel::Basic.solr_query_handler = 'search' }
|
27
|
+
|
28
|
+
it { should eq 'search' }
|
28
29
|
end
|
29
30
|
end
|
30
|
-
|
31
|
-
describe "
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
after :all do
|
41
|
-
SpecModel.send(:remove_const, :CamelCased)
|
42
|
-
end
|
43
|
-
subject {SpecModel::CamelCased}
|
44
|
-
|
45
|
-
describe ".classname_from_uri" do
|
46
|
-
it "should turn an afmodel URI into a Model class name" do
|
47
|
-
expect(ActiveFedora::Model.classname_from_uri('info:fedora/afmodel:SpecModel_CamelCased')).to eq(['SpecModel::CamelCased', 'afmodel'])
|
48
|
-
end
|
49
|
-
it "should not change plurality" do
|
50
|
-
expect(ActiveFedora::Model.classname_from_uri('info:fedora/afmodel:MyMetadata')).to eq(['MyMetadata', 'afmodel'])
|
51
|
-
end
|
52
|
-
it "should capitalize the first letter" do
|
53
|
-
expect(ActiveFedora::Model.classname_from_uri('info:fedora/afmodel:image')).to eq(['Image', 'afmodel'])
|
54
|
-
end
|
31
|
+
|
32
|
+
describe ".from_class_uri" do
|
33
|
+
subject { ActiveFedora::Model.from_class_uri(uri) }
|
34
|
+
context "a blank string" do
|
35
|
+
before { expect(ActiveFedora::Base.logger).to receive(:warn) }
|
36
|
+
let(:uri) { '' }
|
37
|
+
it { should be_nil }
|
55
38
|
end
|
56
39
|
end
|
57
|
-
|
58
40
|
end
|
@@ -4,15 +4,18 @@ describe ActiveFedora::NomDatastream do
|
|
4
4
|
describe "test" do
|
5
5
|
subject {
|
6
6
|
class MyNomDatastream < ActiveFedora::NomDatastream
|
7
|
-
|
7
|
+
|
8
8
|
set_terminology do |t|
|
9
9
|
t.a :path => '//a', :accessor => lambda { |x| x.text }, :index => 'a_s'
|
10
10
|
t.b :path => '//b', :index => 'b_s'
|
11
11
|
end
|
12
|
-
end
|
12
|
+
end
|
13
13
|
|
14
|
-
MyNomDatastream.
|
14
|
+
MyNomDatastream.new
|
15
15
|
}
|
16
|
+
before do
|
17
|
+
subject.content = '<root><a>123</a><b><c>asdf</c></b></root>'
|
18
|
+
end
|
16
19
|
|
17
20
|
it "should work" do
|
18
21
|
expect(subject.a).to include("123")
|
@@ -22,10 +25,6 @@ describe ActiveFedora::NomDatastream do
|
|
22
25
|
expect(subject.to_solr['a_s']).to include('123')
|
23
26
|
expect(subject.to_solr['b_s']).to include('asdf')
|
24
27
|
end
|
25
|
-
|
26
|
-
it "should be a managed datastream" do
|
27
|
-
expect(subject.controlGroup).to eq('M')
|
28
|
-
end
|
29
28
|
end
|
30
29
|
|
31
30
|
describe "with options for .set_terminology" do
|
@@ -41,7 +40,11 @@ describe ActiveFedora::NomDatastream do
|
|
41
40
|
end
|
42
41
|
end
|
43
42
|
|
44
|
-
TerminologyOptions.
|
43
|
+
TerminologyOptions.new
|
44
|
+
}
|
45
|
+
|
46
|
+
before do
|
47
|
+
subject.content = %(
|
45
48
|
<root
|
46
49
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
47
50
|
xmlns:dcterms="http://purl.org/dc/terms/"
|
@@ -51,10 +54,10 @@ describe ActiveFedora::NomDatastream do
|
|
51
54
|
<dcterms:b>abcd</dcterms:b>
|
52
55
|
</root>
|
53
56
|
)
|
54
|
-
|
57
|
+
end
|
55
58
|
|
56
59
|
it "should scope #a attribute to only the dc namespace" do
|
57
|
-
expect(subject.a).to eq
|
60
|
+
expect(subject.a).to eq ["123"]
|
58
61
|
end
|
59
62
|
|
60
63
|
end
|
@@ -4,103 +4,100 @@ describe ActiveFedora::NtriplesRDFDatastream do
|
|
4
4
|
describe "an instance with content" do
|
5
5
|
before do
|
6
6
|
class MyDatastream < ActiveFedora::NtriplesRDFDatastream
|
7
|
-
property :created, predicate: RDF::DC.created
|
8
|
-
property :title, predicate: RDF::DC.title
|
9
|
-
property :publisher, predicate: RDF::DC.publisher
|
10
|
-
property :creator, predicate: RDF::DC.creator
|
11
|
-
property :educationLevel, predicate: RDF::DC.educationLevel
|
12
|
-
property :based_near, predicate: RDF::FOAF.based_near
|
13
|
-
property :related_url, predicate: RDF::RDFS.seeAlso
|
7
|
+
property :created, predicate: ::RDF::DC.created
|
8
|
+
property :title, predicate: ::RDF::DC.title
|
9
|
+
property :publisher, predicate: ::RDF::DC.publisher
|
10
|
+
property :creator, predicate: ::RDF::DC.creator
|
11
|
+
property :educationLevel, predicate: ::RDF::DC.educationLevel
|
12
|
+
property :based_near, predicate: ::RDF::FOAF.based_near
|
13
|
+
property :related_url, predicate: ::RDF::RDFS.seeAlso
|
14
14
|
end
|
15
|
-
@subject = MyDatastream.new(
|
15
|
+
@subject = MyDatastream.new(ActiveFedora::Base.id_to_uri '/test:1/descMetadata')
|
16
16
|
@subject.content = File.new('spec/fixtures/mixed_rdf_descMetadata.nt').read
|
17
17
|
end
|
18
18
|
after do
|
19
19
|
Object.send(:remove_const, :MyDatastream)
|
20
20
|
end
|
21
21
|
it "should have a subject" do
|
22
|
-
expect(@subject.rdf_subject).to eq
|
22
|
+
expect(@subject.rdf_subject).to eq "http://localhost:8983/fedora/rest/test/test:1"
|
23
23
|
end
|
24
|
-
it "should have
|
25
|
-
expect(@subject.
|
26
|
-
end
|
27
|
-
it "should have mimeType" do
|
28
|
-
expect(@subject.mimeType).to eq('application/n-triples')
|
29
|
-
end
|
30
|
-
it "should have dsid" do
|
31
|
-
expect(@subject.dsid).to eq('descMetadata')
|
24
|
+
it "should have mime_type" do
|
25
|
+
expect(@subject.mime_type).to eq 'text/plain'
|
32
26
|
end
|
33
27
|
it "should have fields" do
|
34
|
-
expect(@subject.created).to eq
|
35
|
-
expect(@subject.title).to eq
|
36
|
-
expect(@subject.publisher).to eq
|
37
|
-
expect(@subject.based_near).to eq
|
38
|
-
expect(@subject.related_url.length).to eq
|
39
|
-
expect(@subject.related_url.first.rdf_subject).to eq
|
28
|
+
expect(@subject.created).to eq [Date.parse('2010-12-31')]
|
29
|
+
expect(@subject.title).to eq ["Title of work"]
|
30
|
+
expect(@subject.publisher).to eq ["Penn State"]
|
31
|
+
expect(@subject.based_near).to eq ["New York, NY, US"]
|
32
|
+
expect(@subject.related_url.length).to eq 1
|
33
|
+
expect(@subject.related_url.first.rdf_subject).to eq "http://google.com/"
|
40
34
|
end
|
41
35
|
|
42
36
|
it "should be able to call enumerable methods on the fields" do
|
43
|
-
expect(@subject.title.join(', ')).to eq
|
44
|
-
expect(@subject.title.count).to eq
|
45
|
-
expect(@subject.title.size).to eq
|
46
|
-
expect(@subject.title[0]).to eq
|
47
|
-
expect(@subject.title.to_a).to eq
|
37
|
+
expect(@subject.title.join(', ')).to eq "Title of work"
|
38
|
+
expect(@subject.title.count).to eq 1
|
39
|
+
expect(@subject.title.size).to eq 1
|
40
|
+
expect(@subject.title[0]).to eq "Title of work"
|
41
|
+
expect(@subject.title.to_a).to eq ["Title of work"]
|
48
42
|
val = []
|
49
43
|
@subject.title.each_with_index {|v, i| val << "#{i}. #{v}"}
|
50
|
-
expect(val).to eq
|
44
|
+
expect(val).to eq ["0. Title of work"]
|
51
45
|
end
|
52
46
|
|
53
47
|
it "should return fields that are not TermProxies" do
|
54
48
|
expect(@subject.created).to be_kind_of Array
|
55
49
|
end
|
56
50
|
it "should have method missing" do
|
57
|
-
expect{@subject.frank}.to raise_exception NoMethodError
|
51
|
+
expect(lambda{@subject.frank}).to raise_exception NoMethodError
|
58
52
|
end
|
59
53
|
|
60
54
|
it "should set fields" do
|
61
55
|
@subject.publisher = "St. Martin's Press"
|
62
|
-
expect(@subject.publisher).to eq
|
56
|
+
expect(@subject.publisher).to eq ["St. Martin's Press"]
|
63
57
|
end
|
64
58
|
it "should set rdf literal fields" do
|
65
59
|
@subject.creator = RDF.Literal("Geoff Ryman")
|
66
|
-
expect(@subject.creator).to eq
|
60
|
+
expect(@subject.creator).to eq ["Geoff Ryman"]
|
67
61
|
end
|
68
62
|
it "should append fields" do
|
69
63
|
@subject.publisher << "St. Martin's Press"
|
70
|
-
expect(@subject.publisher).to eq
|
64
|
+
expect(@subject.publisher).to eq ["Penn State", "St. Martin's Press"]
|
71
65
|
end
|
72
66
|
it "should delete fields" do
|
73
67
|
@subject.related_url.delete(RDF::URI("http://google.com/"))
|
74
|
-
expect(@subject.related_url).to eq
|
68
|
+
expect(@subject.related_url).to eq []
|
75
69
|
end
|
76
70
|
end
|
77
71
|
|
78
72
|
describe "some dummy instances" do
|
79
73
|
before do
|
80
|
-
@one = ActiveFedora::RDFDatastream.new
|
81
|
-
@two = ActiveFedora::RDFDatastream.new
|
74
|
+
@one = ActiveFedora::RDFDatastream.new
|
75
|
+
@two = ActiveFedora::RDFDatastream.new
|
82
76
|
end
|
83
77
|
it "should generate predictable prexies" do
|
84
|
-
expect(@one.apply_prefix("baz")).to eq
|
85
|
-
expect(@two.apply_prefix("baz")).to eq
|
78
|
+
expect(@one.apply_prefix("baz", 'myFoobar')).to eq 'my_foobar__baz'
|
79
|
+
expect(@two.apply_prefix("baz", 'myQuix')).to eq 'my_quix__baz'
|
86
80
|
end
|
87
81
|
end
|
88
82
|
|
89
83
|
describe "an instance with a custom subject" do
|
90
84
|
before do
|
91
85
|
class MyDatastream < ActiveFedora::NtriplesRDFDatastream
|
92
|
-
rdf_subject { |ds| "
|
93
|
-
property :created, predicate: RDF::DC.created
|
94
|
-
property :title, predicate: RDF::DC.title
|
95
|
-
property :publisher, predicate: RDF::DC.publisher
|
96
|
-
property :based_near, predicate: RDF::FOAF.based_near
|
97
|
-
property :related_url, predicate: RDF::RDFS.seeAlso
|
86
|
+
rdf_subject { |ds| "http://localhost:8983/fedora/rest/test/#{ds.id}/content" }
|
87
|
+
property :created, predicate: ::RDF::DC.created
|
88
|
+
property :title, predicate: ::RDF::DC.title
|
89
|
+
property :publisher, predicate: ::RDF::DC.publisher
|
90
|
+
property :based_near, predicate: ::RDF::FOAF.based_near
|
91
|
+
property :related_url, predicate: ::RDF::RDFS.seeAlso
|
98
92
|
end
|
99
|
-
@
|
100
|
-
@subject
|
101
|
-
allow(@subject).to
|
102
|
-
allow(@subject).to
|
103
|
-
|
93
|
+
@subject = MyDatastream.new
|
94
|
+
allow(@subject).to receive(:id).and_return 'test:1'
|
95
|
+
allow(@subject).to receive(:new_record?).and_return false
|
96
|
+
allow(@subject).to receive(:remote_content).and_return remote_content
|
97
|
+
end
|
98
|
+
|
99
|
+
let(:remote_content) do
|
100
|
+
File.new('spec/fixtures/mixed_rdf_descMetadata.nt').read
|
104
101
|
end
|
105
102
|
|
106
103
|
after do
|
@@ -108,113 +105,95 @@ describe ActiveFedora::NtriplesRDFDatastream do
|
|
108
105
|
end
|
109
106
|
|
110
107
|
it "should have fields" do
|
111
|
-
expect(@subject.title).to eq
|
108
|
+
expect(@subject.title).to eq ["Title of datastream"]
|
112
109
|
end
|
113
110
|
|
114
111
|
it "should have a custom subject" do
|
115
|
-
expect(@subject.rdf_subject).to eq
|
112
|
+
expect(@subject.rdf_subject).to eq 'http://localhost:8983/fedora/rest/test/test:1/content'
|
116
113
|
end
|
117
114
|
end
|
118
115
|
|
119
116
|
describe "a new instance" do
|
120
117
|
before(:each) do
|
121
118
|
class MyDatastream < ActiveFedora::NtriplesRDFDatastream
|
122
|
-
property :publisher, predicate: RDF::DC.publisher
|
119
|
+
property :publisher, predicate: ::RDF::DC.publisher
|
123
120
|
end
|
124
|
-
@subject = MyDatastream.new
|
125
|
-
allow(@subject).to receive_messages(pid: 'test:1', repository: ActiveFedora::Base.connection_for_pid(0))
|
121
|
+
@subject = MyDatastream.new
|
126
122
|
end
|
127
123
|
after(:each) do
|
128
124
|
Object.send(:remove_const, :MyDatastream)
|
129
125
|
end
|
130
126
|
it "should support to_s method" do
|
131
|
-
expect(@subject.publisher.to_s).to eq
|
127
|
+
expect(@subject.publisher.to_s).to eq [].to_s
|
132
128
|
@subject.publisher = "Bob"
|
133
|
-
expect(@subject.publisher.to_s).to eq
|
129
|
+
expect(@subject.publisher.to_s).to eq ["Bob"].to_s
|
134
130
|
@subject.publisher << "Jim"
|
135
|
-
expect(@subject.publisher.to_s).to eq
|
131
|
+
expect(@subject.publisher.to_s).to eq ["Bob", "Jim"].to_s
|
136
132
|
end
|
137
133
|
end
|
138
134
|
|
139
135
|
describe "solr integration" do
|
140
136
|
before(:all) do
|
141
137
|
class MyDatastream < ActiveFedora::NtriplesRDFDatastream
|
142
|
-
property :created, predicate: RDF::DC.created do |index|
|
138
|
+
property :created, predicate: ::RDF::DC.created do |index|
|
143
139
|
index.as :sortable, :displayable
|
144
140
|
index.type :date
|
145
141
|
end
|
146
|
-
property :title, predicate: RDF::DC.title do |index|
|
142
|
+
property :title, predicate: ::RDF::DC.title do |index|
|
147
143
|
index.as :stored_searchable, :sortable
|
148
144
|
index.type :text
|
149
145
|
end
|
150
|
-
property :publisher, predicate: RDF::DC.publisher do |index|
|
146
|
+
property :publisher, predicate: ::RDF::DC.publisher do |index|
|
151
147
|
index.as :facetable, :sortable, :stored_searchable
|
152
148
|
end
|
153
|
-
property :based_near, predicate: RDF::FOAF.based_near do |index|
|
149
|
+
property :based_near, predicate: ::RDF::FOAF.based_near do |index|
|
154
150
|
index.as :facetable, :stored_searchable
|
155
151
|
index.type :text
|
156
152
|
end
|
157
|
-
property :related_url, predicate: RDF::RDFS.seeAlso do |index|
|
153
|
+
property :related_url, predicate: ::RDF::RDFS.seeAlso do |index|
|
158
154
|
index.as :stored_searchable
|
159
155
|
end
|
160
|
-
property :rights, predicate: RDF::DC.rights
|
156
|
+
property :rights, predicate: ::RDF::DC.rights
|
161
157
|
end
|
162
|
-
@subject = MyDatastream.new(@inner_object, 'solr_rdf')
|
163
|
-
@subject.content = File.new('spec/fixtures/solr_rdf_descMetadata.nt').read
|
164
158
|
end
|
159
|
+
|
165
160
|
after(:all) do
|
166
161
|
Object.send(:remove_const, :MyDatastream)
|
167
162
|
end
|
163
|
+
|
168
164
|
before(:each) do
|
169
|
-
|
165
|
+
@subject = MyDatastream.new
|
166
|
+
@subject.content = File.new('spec/fixtures/solr_rdf_descMetadata.nt').read
|
170
167
|
@subject.serialize
|
171
168
|
end
|
169
|
+
|
172
170
|
it "should provide .to_solr and return a SolrDocument" do
|
173
171
|
expect(@subject).to respond_to(:to_solr)
|
174
172
|
expect(@subject.to_solr).to be_kind_of(Hash)
|
175
173
|
end
|
176
174
|
|
177
175
|
it "should have a solr_name method" do
|
178
|
-
expect(MyDatastream.new(
|
179
|
-
expect(MyDatastream.new(
|
176
|
+
expect(MyDatastream.new.primary_solr_name(:based_near, 'descMetadata')).to eq 'desc_metadata__based_near_tesim'
|
177
|
+
expect(MyDatastream.new.primary_solr_name(:title, 'props')).to eq 'props__title_tesim'
|
180
178
|
end
|
181
179
|
|
182
180
|
it "should optionally allow you to provide the Solr::Document to add fields to and return that document when done" do
|
183
181
|
doc = Hash.new
|
184
|
-
expect(@subject.to_solr(doc)).to eq
|
182
|
+
expect(@subject.to_solr(doc)).to eq doc
|
185
183
|
end
|
186
|
-
it "should iterate through @fields hash" do
|
187
|
-
solr_doc = @subject.to_solr
|
188
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__publisher", type: :string)]).to eq(["publisher1"])
|
189
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__publisher", :sortable)]).to eq("publisher1")
|
190
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__publisher", :facetable)]).to eq(["publisher1"])
|
191
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__based_near", type: :string)]).to eq(["coverage1", "coverage2"])
|
192
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__based_near", :facetable)]).to eq(["coverage1", "coverage2"])
|
193
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__created", :sortable, type: :date)]).to eq("2009-10-10T00:00:00Z")
|
194
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__created", :displayable)]).to eq(["2009-10-10"])
|
195
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__title", type: :string)]).to eq(["fake-title"])
|
196
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__title", :sortable)]).to eq("fake-title")
|
197
|
-
expect(solr_doc[ActiveFedora::SolrService.solr_name("solr_rdf__related_url", type: :string)]).to eq(["http://example.org/"])
|
198
|
-
end
|
199
|
-
|
200
184
|
describe "with an actual object" do
|
201
185
|
before(:each) do
|
202
186
|
class Foo < ActiveFedora::Base
|
203
187
|
has_metadata "descMetadata", type: MyDatastream
|
204
188
|
has_attributes :created, :title, :publisher, :based_near, :related_url, :rights, datastream: :descMetadata, multiple: true
|
205
189
|
end
|
206
|
-
@obj = MyDatastream.new
|
207
|
-
repository = double()
|
208
|
-
allow(@obj).to receive_messages(repository: repository, pid: 'test:1')
|
209
|
-
allow(repository).to receive(:modify_datastream)
|
210
|
-
allow(repository).to receive(:add_datastream)
|
190
|
+
@obj = MyDatastream.new
|
211
191
|
@obj.created = Date.parse("2012-03-04")
|
212
192
|
@obj.title = "Of Mice and Men, The Sequel"
|
213
193
|
@obj.publisher = "Bob's Blogtastic Publishing"
|
214
194
|
@obj.based_near = ["Tacoma, WA", "Renton, WA"]
|
215
195
|
@obj.related_url = "http://example.org/blogtastic/"
|
216
196
|
@obj.rights = "Totally open, y'all"
|
217
|
-
@obj.save
|
218
197
|
end
|
219
198
|
after do
|
220
199
|
Object.send(:remove_const, :Foo)
|
@@ -223,21 +202,23 @@ describe ActiveFedora::NtriplesRDFDatastream do
|
|
223
202
|
|
224
203
|
describe ".fields()" do
|
225
204
|
it "should return the right fields" do
|
226
|
-
expect(@obj.send(:fields).keys).to eq
|
205
|
+
expect(@obj.send(:fields).keys).to eq ["created", "title", "publisher", "based_near", "related_url"]
|
227
206
|
end
|
228
207
|
it "should return the right values" do
|
229
208
|
fields = @obj.send(:fields)
|
230
|
-
expect(fields[:related_url][:values]).to eq
|
231
|
-
expect(fields[:based_near][:values]).to eq
|
209
|
+
expect(fields[:related_url][:values]).to eq ["http://example.org/blogtastic/"]
|
210
|
+
expect(fields[:based_near][:values]).to eq ["Tacoma, WA", "Renton, WA"]
|
232
211
|
end
|
233
212
|
it "should return the right type information" do
|
234
213
|
fields = @obj.send(:fields)
|
235
|
-
expect(fields[:created][:type]).to eq
|
214
|
+
expect(fields[:created][:type]).to eq :date
|
236
215
|
end
|
237
216
|
end
|
217
|
+
|
238
218
|
describe ".to_solr()" do
|
219
|
+
subject { @obj.to_solr({}, name: 'solrRdf') }
|
239
220
|
it "should return the right fields" do
|
240
|
-
expect(
|
221
|
+
expect(subject.keys).to include(ActiveFedora::SolrService.solr_name("solr_rdf__related_url", type: :string),
|
241
222
|
ActiveFedora::SolrService.solr_name("solr_rdf__publisher", type: :string),
|
242
223
|
ActiveFedora::SolrService.solr_name("solr_rdf__publisher", :sortable),
|
243
224
|
ActiveFedora::SolrService.solr_name("solr_rdf__publisher", :facetable),
|
@@ -251,8 +232,12 @@ describe ActiveFedora::NtriplesRDFDatastream do
|
|
251
232
|
end
|
252
233
|
|
253
234
|
it "should return the right values" do
|
254
|
-
expect(
|
255
|
-
expect(
|
235
|
+
expect(subject[ActiveFedora::SolrService.solr_name("solr_rdf__related_url", type: :string)]).to eq ["http://example.org/blogtastic/"]
|
236
|
+
expect(subject[ActiveFedora::SolrService.solr_name("solr_rdf__based_near", type: :string)]).to eq ["Tacoma, WA","Renton, WA"]
|
237
|
+
expect(subject[ActiveFedora::SolrService.solr_name("solr_rdf__based_near", :facetable)]).to eq ["Tacoma, WA","Renton, WA"]
|
238
|
+
expect(subject[ActiveFedora::SolrService.solr_name("solr_rdf__publisher", type: :string)]).to eq ["Bob's Blogtastic Publishing"]
|
239
|
+
expect(subject[ActiveFedora::SolrService.solr_name("solr_rdf__publisher", :sortable)]).to eq "Bob's Blogtastic Publishing"
|
240
|
+
expect(subject[ActiveFedora::SolrService.solr_name("solr_rdf__publisher", :facetable)]).to eq ["Bob's Blogtastic Publishing"]
|
256
241
|
end
|
257
242
|
end
|
258
243
|
end
|