enju_oai 0.1.0.pre17 → 0.1.0.pre18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/Rakefile +1 -12
- data/app/views/manifestations/_record_junii2.oai.builder +113 -0
- data/app/views/manifestations/_record_oai_dc.oai.builder +20 -0
- data/app/views/manifestations/list_identifiers.oai.builder +6 -4
- data/app/views/manifestations/list_metadata_formats.oai.builder +6 -6
- data/app/views/manifestations/list_records.oai.builder +10 -23
- data/app/views/manifestations/show.oai.builder +5 -5
- data/lib/enju_oai/engine.rb +1 -0
- data/lib/enju_oai/oai_controller.rb +4 -3
- data/lib/enju_oai/version.rb +1 -1
- data/spec/controllers/manifestations_controller_spec.rb +12 -0
- data/spec/dummy/app/controllers/application_controller.rb +1 -0
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/db/migrate/20090913173236_create_nii_types.rb +13 -0
- data/spec/dummy/db/migrate/20090913185239_add_nii_type_id_to_manifestation.rb +10 -0
- data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +5 -0
- data/spec/dummy/db/schema.rb +15 -1
- data/spec/fixtures/library_groups.yml +5 -0
- data/spec/fixtures/nii_types.yml +78 -0
- data/spec/spec_helper.rb +0 -1
- data/spec/views/manifestations/list_identifiers.oai.builder_spec.rb +15 -0
- data/spec/views/manifestations/list_metadata_formats.oai.builder_spec.rb +18 -0
- data/spec/views/manifestations/list_records.oai.builder_spec.rb +48 -0
- data/spec/views/manifestations/show.oai.builder_spec.rb +32 -0
- metadata +303 -245
- data/spec/dummy/app/models/setting.rb +0 -4
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe "manifestations/show.oai.builder" do
|
5
|
+
describe "When metadataPrefix is 'oai_dc'" do
|
6
|
+
before(:each) do
|
7
|
+
assign(:manifestation, FactoryGirl.create(:manifestation))
|
8
|
+
assign(:oai, metadataPrefix: 'oai_dc')
|
9
|
+
end
|
10
|
+
|
11
|
+
it "renders the XML template" do
|
12
|
+
render
|
13
|
+
rendered.should match /<metadata\b/
|
14
|
+
rendered.should match /<oai_dc:dc\b/
|
15
|
+
rendered.should match /<dc:title>manifestation_title/
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "When metadataPrefix is 'junii2'" do
|
20
|
+
before(:each) do
|
21
|
+
assign(:manifestation, FactoryGirl.create(:manifestation))
|
22
|
+
assign(:oai, metadataPrefix: 'junii2')
|
23
|
+
end
|
24
|
+
|
25
|
+
it "renders the XML template" do
|
26
|
+
render
|
27
|
+
rendered.should match /<metadata\b/
|
28
|
+
rendered.should match /<junii2\b/
|
29
|
+
rendered.should match /<title>manifestation_title/
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|