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.
@@ -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