active-fedora 8.2.1 → 8.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/active-fedora.gemspec +1 -2
- data/lib/active_fedora/datastream_collections.rb +4 -8
- data/lib/active_fedora/datastreams.rb +7 -9
- data/lib/active_fedora/version.rb +1 -1
- data/spec/config_helper.rb +3 -3
- data/spec/integration/associations_spec.rb +76 -76
- data/spec/integration/auditable_spec.rb +7 -7
- data/spec/integration/autosave_association_spec.rb +3 -3
- data/spec/integration/base_spec.rb +51 -51
- data/spec/integration/belongs_to_association_spec.rb +27 -27
- data/spec/integration/bug_spec.rb +1 -1
- data/spec/integration/collection_association_spec.rb +2 -2
- data/spec/integration/complex_rdf_datastream_spec.rb +32 -32
- data/spec/integration/datastream_collections_spec.rb +42 -42
- data/spec/integration/datastream_spec.rb +19 -19
- data/spec/integration/datastreams_spec.rb +25 -25
- data/spec/integration/delete_all_spec.rb +5 -5
- data/spec/integration/fedora_solr_sync_spec.rb +1 -1
- data/spec/integration/full_featured_model_spec.rb +9 -9
- data/spec/integration/has_and_belongs_to_many_associations_spec.rb +46 -47
- data/spec/integration/has_many_associations_spec.rb +17 -17
- data/spec/integration/json_serialization_spec.rb +2 -2
- data/spec/integration/load_from_solr_spec.rb +1 -1
- data/spec/integration/model_spec.rb +9 -9
- data/spec/integration/nested_attribute_spec.rb +17 -17
- data/spec/integration/ntriples_datastream_spec.rb +43 -43
- data/spec/integration/om_datastream_spec.rb +37 -37
- data/spec/integration/persistence_spec.rb +1 -1
- data/spec/integration/rdf_nested_attributes_spec.rb +9 -9
- data/spec/integration/relation_delegation_spec.rb +7 -7
- data/spec/integration/relation_spec.rb +2 -2
- data/spec/integration/rels_ext_datastream_spec.rb +3 -3
- data/spec/integration/scoped_query_spec.rb +14 -14
- data/spec/integration/solr_service_spec.rb +24 -24
- data/spec/support/mock_fedora.rb +9 -10
- data/spec/unit/active_fedora_spec.rb +20 -20
- data/spec/unit/attributes_spec.rb +24 -24
- data/spec/unit/base_active_model_spec.rb +6 -6
- data/spec/unit/base_cma_spec.rb +2 -2
- data/spec/unit/base_datastream_management_spec.rb +7 -7
- data/spec/unit/base_extra_spec.rb +20 -20
- data/spec/unit/base_spec.rb +141 -141
- data/spec/unit/builder/has_and_belongs_to_many_spec.rb +1 -1
- data/spec/unit/callback_spec.rb +12 -12
- data/spec/unit/code_configurator_spec.rb +7 -7
- data/spec/unit/config_spec.rb +2 -2
- data/spec/unit/content_model_spec.rb +19 -20
- data/spec/unit/core_spec.rb +1 -1
- data/spec/unit/datastream_collections_spec.rb +101 -101
- data/spec/unit/datastream_spec.rb +12 -12
- data/spec/unit/datastreams_spec.rb +39 -39
- data/spec/unit/file_configurator_spec.rb +117 -117
- data/spec/unit/has_and_belongs_to_many_collection_spec.rb +16 -16
- data/spec/unit/has_many_collection_spec.rb +5 -5
- data/spec/unit/inheritance_spec.rb +5 -5
- data/spec/unit/model_spec.rb +5 -5
- data/spec/unit/nom_datastream_spec.rb +5 -5
- data/spec/unit/ntriples_datastream_spec.rb +56 -56
- data/spec/unit/om_datastream_spec.rb +99 -99
- data/spec/unit/persistence_spec.rb +2 -2
- data/spec/unit/predicates_spec.rb +28 -28
- data/spec/unit/property_spec.rb +5 -5
- data/spec/unit/qualified_dublin_core_datastream_spec.rb +10 -10
- data/spec/unit/query_spec.rb +66 -66
- data/spec/unit/rdf_datastream_spec.rb +10 -10
- data/spec/unit/rdf_resource_datastream_spec.rb +2 -2
- data/spec/unit/rdf_xml_writer_spec.rb +3 -3
- data/spec/unit/rdfxml_rdf_datastream_spec.rb +9 -9
- data/spec/unit/relationship_graph_spec.rb +31 -31
- data/spec/unit/reload_on_save_spec.rb +3 -3
- data/spec/unit/rels_ext_datastream_spec.rb +28 -28
- data/spec/unit/rspec_matchers/belong_to_associated_active_fedora_object_matcher_spec.rb +11 -11
- data/spec/unit/rspec_matchers/have_many_associated_active_fedora_objects_matcher_spec.rb +11 -11
- data/spec/unit/rspec_matchers/have_predicate_matcher_spec.rb +11 -11
- data/spec/unit/rspec_matchers/match_fedora_datastream_matcher_spec.rb +7 -7
- data/spec/unit/rubydora_connection_spec.rb +3 -3
- data/spec/unit/semantic_node_spec.rb +17 -17
- data/spec/unit/serializers_spec.rb +1 -1
- data/spec/unit/service_definitions_spec.rb +11 -11
- data/spec/unit/simple_datastream_spec.rb +6 -6
- data/spec/unit/solr_config_options_spec.rb +10 -10
- data/spec/unit/solr_digital_object_spec.rb +4 -4
- data/spec/unit/solr_service_spec.rb +41 -41
- data/spec/unit/unsaved_digital_object_spec.rb +8 -8
- data/spec/unit/validations_spec.rb +6 -6
- metadata +4 -4
@@ -5,24 +5,24 @@ describe ActiveFedora::UnsavedDigitalObject do
|
|
5
5
|
describe "an unsaved instance" do
|
6
6
|
subject { ActiveFedora::UnsavedDigitalObject.new(ActiveFedora::Base, 'bar') }
|
7
7
|
|
8
|
-
it {
|
8
|
+
it { is_expected.to be_new_record}
|
9
9
|
|
10
10
|
it "should have ownerId property" do
|
11
11
|
subject.ownerId = 'fooo'
|
12
|
-
subject.ownerId.
|
12
|
+
expect(subject.ownerId).to eq('fooo')
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should have state" do
|
16
16
|
subject.ownerId = 'D'
|
17
|
-
subject.ownerId.
|
17
|
+
expect(subject.ownerId).to eq('D')
|
18
18
|
end
|
19
19
|
|
20
20
|
it "should not have a default pid" do
|
21
|
-
subject.pid.
|
21
|
+
expect(subject.pid).to be_nil
|
22
22
|
end
|
23
23
|
it "should be able to set the pid" do
|
24
24
|
subject.pid = "my:new_object"
|
25
|
-
subject.pid.
|
25
|
+
expect(subject.pid).to eq("my:new_object")
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -35,13 +35,13 @@ describe ActiveFedora::UnsavedDigitalObject do
|
|
35
35
|
@saved_obj = obj.save
|
36
36
|
end
|
37
37
|
it "should be a digital object" do
|
38
|
-
@saved_obj.
|
38
|
+
expect(@saved_obj).to be_kind_of ActiveFedora::DigitalObject
|
39
39
|
end
|
40
40
|
it "should set the ownerId property" do
|
41
|
-
@saved_obj.ownerId.
|
41
|
+
expect(@saved_obj.ownerId).to eq('fooo')
|
42
42
|
end
|
43
43
|
it "should set the label property" do
|
44
|
-
@saved_obj.label.
|
44
|
+
expect(@saved_obj.label).to eq('my label')
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -27,23 +27,23 @@ describe ActiveFedora::Base do
|
|
27
27
|
subject.attributes = { fubar: ['here'], swank: 'long enough' }
|
28
28
|
end
|
29
29
|
|
30
|
-
it {
|
30
|
+
it { is_expected.to be_valid}
|
31
31
|
end
|
32
32
|
describe "an invalid object" do
|
33
33
|
before do
|
34
34
|
subject.attributes = { swank: 'smal' }
|
35
35
|
end
|
36
36
|
it "should have errors" do
|
37
|
-
subject.
|
38
|
-
subject.errors[:fubar].
|
39
|
-
subject.errors[:swank].
|
37
|
+
expect(subject).not_to be_valid
|
38
|
+
expect(subject.errors[:fubar]).to eq(["can't be blank"])
|
39
|
+
expect(subject.errors[:swank]).to eq(["is too short (minimum is 5 characters)"])
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
43
|
describe "required terms" do
|
44
44
|
it "should be required" do
|
45
|
-
subject.required?(:fubar).
|
46
|
-
subject.required?(:swank).
|
45
|
+
expect(subject.required?(:fubar)).to be true
|
46
|
+
expect(subject.required?(:swank)).to be false
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-fedora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.2.
|
4
|
+
version: 8.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|
@@ -192,14 +192,14 @@ dependencies:
|
|
192
192
|
requirements:
|
193
193
|
- - "~>"
|
194
194
|
- !ruby/object:Gem::Version
|
195
|
-
version: '
|
195
|
+
version: '3.0'
|
196
196
|
type: :development
|
197
197
|
prerelease: false
|
198
198
|
version_requirements: !ruby/object:Gem::Requirement
|
199
199
|
requirements:
|
200
200
|
- - "~>"
|
201
201
|
- !ruby/object:Gem::Version
|
202
|
-
version: '
|
202
|
+
version: '3.0'
|
203
203
|
- !ruby/object:Gem::Dependency
|
204
204
|
name: rspec-its
|
205
205
|
requirement: !ruby/object:Gem::Requirement
|