hydra-head 3.0.1 → 3.1.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +54 -20
- data/HISTORY.textile +0 -7
- data/app/controllers/assets_controller.rb +1 -2
- data/app/controllers/contributors_controller.rb +2 -2
- data/app/controllers/downloads_controller.rb +1 -3
- data/app/controllers/file_assets_controller.rb +2 -4
- data/app/controllers/generic_content_objects_controller.rb +1 -2
- data/app/controllers/get_controller.rb +1 -3
- data/app/controllers/permissions_controller.rb +14 -28
- data/app/models/file_asset.rb +6 -2
- data/app/views/catalog/_edit_partials/_default.html.erb +5 -5
- data/app/views/contributors/_index.html.erb +1 -1
- data/app/views/generic_content_objects/_show_description.html.erb +3 -3
- data/app/views/mods_assets/_publication_form.html.erb +2 -2
- data/app/views/mods_assets/_show_contributors.html.erb +4 -4
- data/app/views/mods_assets/_show_description.html.erb +4 -4
- data/app/views/mods_assets/_show_publication.html.erb +2 -2
- data/app/views/permissions/_edit_person_permissions.html.erb +1 -1
- data/app/views/permissions/_index.html.erb +2 -2
- data/hydra-head.gemspec +3 -4
- data/lib/generators/hydra/head_generator.rb +2 -3
- data/lib/generators/hydra/templates/config/initializers/action_dispatch_http_upload_monkey_patch.rb +12 -0
- data/lib/generators/hydra/templates/config/initializers/blacklight_config.rb +0 -7
- data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +1 -7
- data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +55 -117
- data/lib/hydra/access_controls_enforcement.rb +5 -47
- data/lib/hydra/catalog.rb +1 -1
- data/lib/hydra/common_mods_index_methods.rb +0 -1
- data/lib/hydra/file_assets_helper.rb +0 -1
- data/lib/hydra/generic_content.rb +7 -6
- data/lib/hydra/model_methods.rb +7 -6
- data/lib/hydra/rights_metadata.rb +2 -2
- data/lib/hydra-head/version.rb +1 -1
- data/lib/mediashelf/active_fedora_helper.rb +0 -10
- data/lib/railties/hydra-fixtures.rake +14 -18
- data/lib/railties/hyhead_rspec.rake +0 -10
- data/solr_conf/conf/schema.xml +0 -2
- data/solr_conf/conf/solrconfig.xml +29 -116
- data/tasks/hydra-head.rake +6 -6
- data/test_support/features/absent_model_search_result.feature +8 -2
- data/test_support/features/step_definitions/edit_metadata_steps.rb +1 -1
- data/test_support/fixtures/small_file.txt +1 -0
- data/test_support/spec/controllers/catalog_controller_spec.rb +16 -15
- data/test_support/spec/controllers/file_assets_controller_spec.rb +7 -14
- data/test_support/spec/controllers/permissions_controller_spec.rb +12 -4
- data/test_support/spec/helpers/access_controls_enforcement_spec.rb +0 -77
- data/test_support/spec/helpers/hydra_model_methods_spec.rb +9 -4
- data/test_support/spec/integration/file_asset_spec.rb +115 -102
- data/test_support/spec/lib/active_fedora_helper_spec.rb +1 -1
- data/test_support/spec/models/audio_asset_spec.rb +3 -3
- data/test_support/spec/models/file_asset_spec.rb +6 -5
- data/test_support/spec/models/generic_content_spec.rb +1 -2
- data/test_support/spec/models/generic_image_spec.rb +1 -1
- data/test_support/spec/models/hydra_rights_metadata_spec.rb +8 -3
- data/test_support/spec/models/image_asset_spec.rb +3 -3
- data/test_support/spec/models/mods_asset_spec.rb +3 -3
- data/test_support/spec/models/video_asset_spec.rb +3 -3
- data/vendor/cache/{active-fedora-3.0.7.gem → active-fedora-3.1.0.rc1.gem} +0 -0
- data/vendor/cache/akami-1.0.0.gem +0 -0
- data/vendor/cache/factory_girl-2.2.0.gem +0 -0
- data/vendor/cache/ffi-1.0.10.gem +0 -0
- data/vendor/cache/gherkin-2.5.4.gem +0 -0
- data/vendor/cache/gyoku-0.4.4.gem +0 -0
- data/vendor/cache/httpi-0.9.5.gem +0 -0
- data/vendor/cache/jettywrapper-1.0.1.gem +0 -0
- data/vendor/cache/nori-1.0.2.gem +0 -0
- data/vendor/cache/rdf-0.3.4.1.gem +0 -0
- data/vendor/cache/rdf-rdfxml-0.3.5.gem +0 -0
- data/vendor/cache/rdoc-3.11.gem +0 -0
- data/vendor/cache/rspec-2.7.0.gem +0 -0
- data/vendor/cache/rspec-core-2.7.1.gem +0 -0
- data/vendor/cache/rspec-expectations-2.7.0.gem +0 -0
- data/vendor/cache/rspec-mocks-2.7.0.gem +0 -0
- data/vendor/cache/rspec-rails-2.7.0.gem +0 -0
- data/vendor/cache/rubydora-0.1.9.gem +0 -0
- data/vendor/cache/savon-0.9.7.gem +0 -0
- data/vendor/cache/wasabi-2.0.0.gem +0 -0
- metadata +94 -93
- data/RELEASE_NOTES.textile +0 -8
- data/vendor/cache/factory_girl-2.1.2.gem +0 -0
- data/vendor/cache/ffi-1.0.9.gem +0 -0
- data/vendor/cache/gherkin-2.5.2.gem +0 -0
- data/vendor/cache/jettywrapper-0.0.10.gem +0 -0
- data/vendor/cache/rcov-0.9.11.gem +0 -0
- data/vendor/cache/rdoc-3.10.gem +0 -0
- data/vendor/cache/rspec-2.6.0.gem +0 -0
- data/vendor/cache/rspec-core-2.6.4.gem +0 -0
- data/vendor/cache/rspec-expectations-2.6.0.gem +0 -0
- data/vendor/cache/rspec-mocks-2.6.0.gem +0 -0
- data/vendor/cache/rspec-rails-2.6.1.gem +0 -0
@@ -11,129 +11,138 @@ end
|
|
11
11
|
describe FileAsset do
|
12
12
|
before(:each) do
|
13
13
|
@file_asset = FileAsset.new
|
14
|
-
@image_asset = ImageAsset.new
|
15
|
-
@audio_asset = AudioAsset.new
|
16
|
-
@video_asset = VideoAsset.new
|
17
|
-
@asset1 = ActiveFedora::Base.new
|
18
|
-
@asset2 = ActiveFedora::Base.new
|
19
|
-
@asset3 = ActiveFedora::Base.new
|
20
|
-
@dummy_file_asset = DummyFileAsset.new
|
21
|
-
@asset1.save
|
22
|
-
@asset2.save
|
23
|
-
@asset3.save
|
24
|
-
@image_asset.save
|
25
|
-
@audio_asset.save
|
26
|
-
@video_asset.save
|
27
|
-
@dummy_file_asset.save
|
28
14
|
end
|
29
|
-
|
30
15
|
after(:each) do
|
31
16
|
begin
|
32
17
|
@file_asset.delete
|
33
18
|
rescue
|
34
19
|
end
|
35
|
-
begin
|
36
|
-
@asset1.delete
|
37
|
-
rescue
|
38
|
-
end
|
39
|
-
begin
|
40
|
-
@asset2.delete
|
41
|
-
rescue
|
42
|
-
end
|
43
|
-
begin
|
44
|
-
@asset3.delete
|
45
|
-
rescue
|
46
|
-
end
|
47
|
-
begin
|
48
|
-
@image_asset.delete
|
49
|
-
rescue
|
50
|
-
end
|
51
|
-
begin
|
52
|
-
@audio_asset.delete
|
53
|
-
rescue
|
54
|
-
end
|
55
|
-
begin
|
56
|
-
@video_asset.delete
|
57
|
-
rescue
|
58
|
-
end
|
59
|
-
begin
|
60
|
-
@dummy_file_asset.delete
|
61
|
-
rescue
|
62
|
-
end
|
63
20
|
end
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
@
|
70
|
-
#is_part_of
|
71
|
-
@file_asset.part_of_append(@asset1)
|
72
|
-
@file_asset.containers(:response_format=>:id_array).should == [@asset1.pid]
|
73
|
-
#has_part + is_part_of
|
74
|
-
@asset2.parts_append(@file_asset)
|
75
|
-
@asset2.save
|
76
|
-
@file_asset.containers(:response_format=>:id_array).should == [@asset2.pid,@asset1.pid]
|
77
|
-
#has_part
|
78
|
-
@file_asset.part_of_remove(@asset1)
|
79
|
-
@file_asset.containers(:response_format=>:id_array).should == [@asset2.pid]
|
80
|
-
#has_collection_member
|
81
|
-
@asset2.parts_remove(@file_asset)
|
21
|
+
describe "with parts" do
|
22
|
+
before(:each) do
|
23
|
+
@asset1 = ActiveFedora::Base.new
|
24
|
+
@asset2 = ActiveFedora::Base.new
|
25
|
+
@asset3 = ActiveFedora::Base.new
|
26
|
+
@asset1.save
|
82
27
|
@asset2.save
|
83
|
-
@asset3.collection_members_append(@file_asset)
|
84
28
|
@asset3.save
|
85
|
-
@file_asset.containers(:response_format=>:id_array).should == [@asset3.pid]
|
86
|
-
#is_part_of + has_collection_member
|
87
|
-
@file_asset.part_of_append(@asset1)
|
88
|
-
@file_asset.containers(:response_format=>:id_array).should == [@asset3.pid,@asset1.pid]
|
89
|
-
#has_part + has_collection_member
|
90
|
-
@file_asset.part_of_remove(@asset1)
|
91
|
-
@asset2.parts_append(@file_asset)
|
92
|
-
@asset2.save
|
93
|
-
@file_asset.containers(:response_format=>:id_array).should == [@asset3.pid,@asset2.pid]
|
94
|
-
#has_collection_member + has_part + is_part_of
|
95
|
-
@file_asset.part_of_append(@asset1)
|
96
|
-
@file_asset.containers(:response_format=>:id_array).should == [@asset3.pid,@asset2.pid,@asset1.pid]
|
97
29
|
end
|
98
|
-
end
|
99
30
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
@
|
107
|
-
|
31
|
+
after(:each) do
|
32
|
+
begin
|
33
|
+
@asset1.delete
|
34
|
+
rescue
|
35
|
+
end
|
36
|
+
begin
|
37
|
+
@asset2.delete
|
38
|
+
rescue
|
39
|
+
end
|
40
|
+
begin
|
41
|
+
@asset3.delete
|
42
|
+
rescue
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe ".containers" do
|
47
|
+
it "should return asset container objects via either inbound has_collection_member, inbound has_part, or outbound is_part_of relationships" do
|
48
|
+
#test all possible combinations...
|
49
|
+
#none
|
50
|
+
@file_asset.containers(:response_format=>:id_array).should == []
|
51
|
+
#is_part_of
|
52
|
+
@file_asset.part_of_append(@asset1)
|
53
|
+
@file_asset.containers(:response_format=>:id_array).should == [@asset1.pid]
|
54
|
+
#has_part + is_part_of
|
55
|
+
@asset2.parts_append(@file_asset)
|
56
|
+
@asset2.save
|
57
|
+
@file_asset.containers(:response_format=>:id_array).should == [@asset2.pid,@asset1.pid]
|
58
|
+
#has_part
|
59
|
+
@file_asset.part_of_remove(@asset1)
|
60
|
+
@file_asset.containers(:response_format=>:id_array).should == [@asset2.pid]
|
61
|
+
#has_collection_member
|
62
|
+
@asset2.parts_remove(@file_asset)
|
63
|
+
@asset2.save
|
64
|
+
@asset3.collection_members_append(@file_asset)
|
65
|
+
@asset3.save
|
66
|
+
@file_asset.containers(:response_format=>:id_array).should == [@asset3.pid]
|
67
|
+
#is_part_of + has_collection_member
|
68
|
+
@file_asset.part_of_append(@asset1)
|
69
|
+
@file_asset.containers(:response_format=>:id_array).should == [@asset3.pid,@asset1.pid]
|
70
|
+
#has_part + has_collection_member
|
71
|
+
@file_asset.part_of_remove(@asset1)
|
72
|
+
@asset2.parts_append(@file_asset)
|
73
|
+
@asset2.save
|
74
|
+
@file_asset.containers(:response_format=>:id_array).should == [@asset3.pid,@asset2.pid]
|
75
|
+
#has_collection_member + has_part + is_part_of
|
76
|
+
@file_asset.part_of_append(@asset1)
|
77
|
+
@file_asset.containers(:response_format=>:id_array).should == [@asset3.pid,@asset2.pid,@asset1.pid]
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
describe ".containers_ids" do
|
82
|
+
it "should return an array of container ids instead of objects" do
|
83
|
+
#test all possible combinations...
|
84
|
+
#none
|
85
|
+
@file_asset.containers_ids.should == []
|
86
|
+
#is_part_of
|
87
|
+
@file_asset.part_of_append(@asset1)
|
88
|
+
@file_asset.containers_ids.should == [@asset1.pid]
|
89
|
+
end
|
108
90
|
end
|
109
91
|
end
|
110
92
|
|
111
|
-
|
93
|
+
describe ".to_solr" do
|
112
94
|
it "should load base fields correctly if active_fedora_model is FileAsset" do
|
113
95
|
@file_asset.update_indexed_attributes({:title=>{0=>"testing"}})
|
114
96
|
solr_doc = @file_asset.to_solr
|
115
97
|
solr_doc["title_t"].should == ["testing"]
|
116
98
|
end
|
117
99
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
100
|
+
describe "with many kinds of assets" do
|
101
|
+
before(:each) do
|
102
|
+
@image_asset = ImageAsset.new
|
103
|
+
@audio_asset = AudioAsset.new
|
104
|
+
@video_asset = VideoAsset.new
|
105
|
+
@image_asset.save
|
106
|
+
@audio_asset.save
|
107
|
+
@video_asset.save
|
108
|
+
end
|
109
|
+
after do
|
110
|
+
begin
|
111
|
+
@image_asset.delete
|
112
|
+
rescue
|
113
|
+
end
|
114
|
+
begin
|
115
|
+
@audio_asset.delete
|
116
|
+
rescue
|
117
|
+
end
|
118
|
+
begin
|
119
|
+
@video_asset.delete
|
120
|
+
rescue
|
121
|
+
end
|
122
|
+
end
|
123
|
+
it "should not load base fields twice for FileAsset if active_fedora_model is a class that is child of FileAsset" do
|
124
|
+
## It's updating DC and descMetadata, because both have title.
|
125
|
+
@image_asset.update_indexed_attributes({:title=>{0=>"testing"}})
|
126
|
+
#call Solrizer::Indexer.create_document since that produces the problem
|
127
|
+
@image_asset.save
|
128
|
+
solr_doc = ImageAsset.find_by_solr(@image_asset.pid).hits.first
|
129
|
+
solr_doc["title_t"].should == ["testing"]
|
130
|
+
@audio_asset.update_indexed_attributes({:title=>{0=>"testing"}})
|
131
|
+
#call Solrizer::Indexer.create_document since that produces the problem
|
132
|
+
@audio_asset.save
|
133
|
+
solr_doc = AudioAsset.find_by_solr(@audio_asset.pid).hits.first
|
134
|
+
solr_doc["title_t"].should == ["testing"]
|
135
|
+
@video_asset.update_indexed_attributes({:title=>{0=>"testing"}})
|
136
|
+
#call Solrizer::Indexer.create_document since that produces the problem
|
137
|
+
@video_asset.save
|
138
|
+
solr_doc = VideoAsset.find_by_solr(@video_asset.pid).hits.first
|
139
|
+
solr_doc["title_t"].should == ["testing"]
|
140
|
+
end
|
134
141
|
end
|
135
|
-
|
136
142
|
it "should load base fields for FileAsset for model_only if active_fedora_model is not FileAsset but is not child of FileAsset" do
|
143
|
+
pending "I'm unconvinced as to the usefullness of this test. Why create as one type then reload as another? - Justin"
|
144
|
+
@dummy_file_asset = DummyFileAsset.new
|
145
|
+
@dummy_file_asset.save
|
137
146
|
file_asset = FileAsset.load_instance(@dummy_file_asset.pid)
|
138
147
|
ENABLE_SOLR_UPDATES = false
|
139
148
|
#it should save change to Fedora, but not solr
|
@@ -141,10 +150,14 @@ describe FileAsset do
|
|
141
150
|
file_asset.save
|
142
151
|
ENABLE_SOLR_UPDATES = true
|
143
152
|
solr_doc = DummyFileAsset.find_by_solr(@dummy_file_asset.pid).hits.first
|
144
|
-
solr_doc["title_t"].
|
153
|
+
solr_doc["title_t"].should be_nil
|
145
154
|
@dummy_file_asset.update_index
|
146
155
|
solr_doc = DummyFileAsset.find_by_solr(@dummy_file_asset.pid).hits.first
|
147
156
|
solr_doc["title_t"].should == ["testing"]
|
157
|
+
begin
|
158
|
+
@dummy_file_asset.delete
|
159
|
+
rescue
|
160
|
+
end
|
148
161
|
end
|
149
162
|
end
|
150
163
|
end
|
@@ -48,7 +48,7 @@ describe MediaShelf::ActiveFedoraHelper do
|
|
48
48
|
solr_af_obj = helper.load_af_instance_from_solr(solr_doc)
|
49
49
|
fed_af_obj = ActiveFedora::Base.load_instance(pid)
|
50
50
|
#check both inbound and outbound match
|
51
|
-
fed_af_obj.outbound_relationships.should == solr_af_obj.outbound_relationships
|
51
|
+
fed_af_obj.outbound_relationships.to_hash.should == solr_af_obj.outbound_relationships.to_hash
|
52
52
|
fed_af_obj.inbound_relationships.should == solr_af_obj.inbound_relationships
|
53
53
|
end
|
54
54
|
end
|
@@ -4,7 +4,7 @@ require "active_fedora"
|
|
4
4
|
describe AudioAsset do
|
5
5
|
|
6
6
|
before(:each) do
|
7
|
-
Fedora::Repository.stubs(:instance).returns(stub_everything())
|
7
|
+
# Fedora::Repository.stubs(:instance).returns(stub_everything())
|
8
8
|
@asset = AudioAsset.new
|
9
9
|
@asset.stubs(:create_date).returns("2008-07-02T05:09:42.015Z")
|
10
10
|
@asset.stubs(:modified_date).returns("2008-09-29T21:21:52.892Z")
|
@@ -17,7 +17,7 @@ describe AudioAsset do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should have a conforms_to relationship pointing to FileAsset" do
|
20
|
-
@asset.
|
20
|
+
@asset.ids_for_outbound(:has_model).should include("afmodel:FileAsset")
|
21
21
|
end
|
22
22
|
|
23
|
-
end
|
23
|
+
end
|
@@ -4,7 +4,7 @@ require "active_fedora"
|
|
4
4
|
describe FileAsset do
|
5
5
|
|
6
6
|
before(:each) do
|
7
|
-
Fedora::Repository.stubs(:instance).returns(stub_everything())
|
7
|
+
# Fedora::Repository.stubs(:instance).returns(stub_everything())
|
8
8
|
@file_asset = FileAsset.new
|
9
9
|
@file_asset.stubs(:create_date).returns("2008-07-02T05:09:42.015Z")
|
10
10
|
@file_asset.stubs(:modified_date).returns("2008-09-29T21:21:52.892Z")
|
@@ -35,8 +35,9 @@ describe FileAsset do
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
describe
|
39
|
-
|
40
|
-
|
38
|
+
describe 'label' do
|
39
|
+
asset = FileAsset.new
|
40
|
+
asset.label = 'image.jp2'
|
41
|
+
asset.label.should == 'image.jp2'
|
41
42
|
end
|
42
|
-
end
|
43
|
+
end
|
@@ -4,7 +4,6 @@ require "active_fedora"
|
|
4
4
|
describe GenericContent do
|
5
5
|
|
6
6
|
before(:each) do
|
7
|
-
Fedora::Repository.stubs(:instance).returns(stub_everything())
|
8
7
|
@hydra_content = GenericContent.new
|
9
8
|
end
|
10
9
|
|
@@ -26,4 +25,4 @@ describe GenericContent do
|
|
26
25
|
@hydra_content.should respond_to(:original=)
|
27
26
|
end
|
28
27
|
|
29
|
-
end
|
28
|
+
end
|
@@ -5,8 +5,10 @@ require "nokogiri"
|
|
5
5
|
describe Hydra::RightsMetadata do
|
6
6
|
|
7
7
|
before(:each) do
|
8
|
-
|
9
|
-
|
8
|
+
ActiveFedora::RubydoraConnection.stubs(:instance).returns(stub_everything())
|
9
|
+
obj = ActiveFedora::Base.new
|
10
|
+
@sample = Hydra::RightsMetadata.new(obj.inner_object, nil)
|
11
|
+
@sample.stubs(:content).returns('')
|
10
12
|
end
|
11
13
|
|
12
14
|
describe "permissions" do
|
@@ -125,7 +127,10 @@ describe Hydra::RightsMetadata do
|
|
125
127
|
it "should solrize fixture content correctly" do
|
126
128
|
fixture_xml = Nokogiri::XML::Document.parse( File.new(File.join( File.dirname(__FILE__), "../../fixtures/hydrangea_fixture_mods_article1.foxml.xml") ))
|
127
129
|
fixture_rights = fixture_xml.xpath("//foxml:datastream[@ID='rightsMetadata']/foxml:datastreamVersion[last()]/foxml:xmlContent", {'foxml'=>"info:fedora/fedora-system:def/foxml#"}).first.to_xml
|
128
|
-
lsample = Hydra::RightsMetadata.
|
130
|
+
lsample = Hydra::RightsMetadata.new(nil, nil)
|
131
|
+
lsample.content = fixture_rights
|
132
|
+
# lsample.expects(:content).returns('')
|
133
|
+
lsample = Hydra::RightsMetadata.from_xml(fixture_rights, lsample)
|
129
134
|
solr_doc = lsample.to_solr
|
130
135
|
solr_doc["edit_access_person_t"].should == ["researcher1"]
|
131
136
|
solr_doc["edit_access_group_t"].should == ["archivist"]
|
@@ -4,7 +4,7 @@ require "active_fedora"
|
|
4
4
|
describe ImageAsset do
|
5
5
|
|
6
6
|
before(:each) do
|
7
|
-
Fedora::Repository.stubs(:instance).returns(stub_everything())
|
7
|
+
# Fedora::Repository.stubs(:instance).returns(stub_everything())
|
8
8
|
@asset = ImageAsset.new
|
9
9
|
@asset.stubs(:create_date).returns("2008-07-02T05:09:42.015Z")
|
10
10
|
@asset.stubs(:modified_date).returns("2008-09-29T21:21:52.892Z")
|
@@ -17,7 +17,7 @@ describe ImageAsset do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should have a conforms_to relationship pointing to FileAsset" do
|
20
|
-
@asset.
|
20
|
+
@asset.ids_for_outbound(:has_model).should include("afmodel:FileAsset")
|
21
21
|
end
|
22
22
|
|
23
|
-
end
|
23
|
+
end
|
@@ -3,8 +3,8 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
3
3
|
describe ModsAsset do
|
4
4
|
|
5
5
|
before(:each) do
|
6
|
-
Fedora::Repository.stubs(:instance).returns(stub_everything())
|
7
|
-
@asset = ModsAsset.new
|
6
|
+
# Fedora::Repository.stubs(:instance).returns(stub_everything())
|
7
|
+
@asset = ModsAsset.new nil
|
8
8
|
# @asset.stubs(:create_date).returns("2008-07-02T05:09:42.015Z")
|
9
9
|
# @asset.stubs(:modified_date).returns("2008-09-29T21:21:52.892Z")
|
10
10
|
end
|
@@ -26,4 +26,4 @@ describe ModsAsset do
|
|
26
26
|
@asset.relationships[:self][:has_model].should include("info:fedora/hydra-cModel:modsObject")
|
27
27
|
end
|
28
28
|
|
29
|
-
end
|
29
|
+
end
|
@@ -4,7 +4,7 @@ require "active_fedora"
|
|
4
4
|
describe VideoAsset do
|
5
5
|
|
6
6
|
before(:each) do
|
7
|
-
Fedora::Repository.stubs(:instance).returns(stub_everything())
|
7
|
+
# Fedora::Repository.stubs(:instance).returns(stub_everything())
|
8
8
|
@asset = VideoAsset.new
|
9
9
|
@asset.stubs(:create_date).returns("2008-07-02T05:09:42.015Z")
|
10
10
|
@asset.stubs(:modified_date).returns("2008-09-29T21:21:52.892Z")
|
@@ -17,7 +17,7 @@ describe VideoAsset do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should have a conforms_to relationship pointing to FileAsset" do
|
20
|
-
@asset.
|
20
|
+
@asset.ids_for_outbound(:has_model).should include("afmodel:FileAsset")
|
21
21
|
end
|
22
22
|
|
23
|
-
end
|
23
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|