Sha256: dd3cbca0fbb343a4d50030cc289e696705b7e9f3f50004e360d9394459ce953f

Contents?: true

Size: 703 Bytes

Versions: 7

Compression:

Stored size: 703 Bytes

Contents

require "rails_helper.rb"

describe "manifestations/index.rdf.builder" do
  before(:each) do
    manifestation = FactoryGirl.create(:manifestation)
    @manifestations = assign(:manifestations, [ manifestation ] )
    @library_group = LibraryGroup.first
    view.stub(:filtered_params).and_return(ActionController::Parameters.new(per_page: 50))
  end

  it "should export RDF format" do
    params[:format] = "rdf"
    render
    doc = Nokogiri::XML(rendered)
    nodes = doc.css('item')
    expect(nodes).not_to be_empty
    nodes.each do |node|
      rdf_ns = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      expect(node.attribute_with_ns("about", rdf_ns).value).not_to be_empty
    end
  end
end

Version data entries

7 entries across 6 versions & 2 rubygems

Version Path
enju_biblio-0.2.3 spec/views/manifestations/index.rdf.builder_spec.rb
enju_biblio-0.2.2 spec/views/manifestations/index.rdf.builder_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_biblio-0.2.0/spec/views/manifestations/index.rdf.builder_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_biblio-0.2.1/spec/views/manifestations/index.rdf.builder_spec.rb
enju_biblio-0.2.1 spec/views/manifestations/index.rdf.builder_spec.rb
enju_biblio-0.2.0 spec/views/manifestations/index.rdf.builder_spec.rb
enju_biblio-0.2.0.beta.4 spec/views/manifestations/index.rdf.builder_spec.rb