Sha256: e0c0d960a17400fc4255475d475957801d567ce690aeab8b1a77d8ffcea66697

Contents?: true

Size: 888 Bytes

Versions: 2

Compression:

Stored size: 888 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'spec_helper'

describe "manifestations/show.oai.builder" do
  describe "When metadataPrefix is 'oai_dc'" do
    before(:each) do
      assign(:manifestation, FactoryGirl.create(:manifestation))
      assign(:oai, metadataPrefix: 'oai_dc')
    end

    it "renders the XML template" do
      render
      rendered.should match /<metadata\b/
      rendered.should match /<oai_dc:dc\b/
      rendered.should match /<dc:title>manifestation_title/
    end
  end

  describe "When metadataPrefix is 'junii2'" do
    before(:each) do
      assign(:manifestation, FactoryGirl.create(:manifestation))
      assign(:oai, metadataPrefix: 'junii2')
    end

    it "renders the XML template" do
      render
      rendered.should match /<metadata\b/
      rendered.should match /<junii2\b/
      rendered.should match /<title>manifestation_title/
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enju_oai-0.1.0.pre19 spec/views/manifestations/show.oai.builder_spec.rb
enju_oai-0.1.0.pre18 spec/views/manifestations/show.oai.builder_spec.rb