Sha256: edfc629a3cc091b048f710434c466825d35e8a317e5f687e4aacb3c60d13913d

Contents?: true

Size: 1.81 KB

Versions: 18

Compression:

Stored size: 1.81 KB

Contents

require 'spec_helper'

describe ManifestationsController do
  fixtures :all

  def valid_attributes
    FactoryGirl.attributes_for(:manifestation)
  end

  describe "GET index", :solr => true do
    before do
      Manifestation.reindex
    end

    describe "When not logged in" do
      it "assigns all manifestations as @manifestations in oai format without verb" do
        get :index, :format => 'oai'
        assigns(:manifestations).should_not be_nil
        response.should render_template("manifestations/index")
      end

      it "assigns all manifestations as @manifestations in oai format with ListRecords" do
        get :index, :format => 'oai', :verb => 'ListRecords'
        assigns(:manifestations).should_not be_nil
        response.should render_template("manifestations/list_records")
      end

      it "assigns all manifestations as @manifestations in oai format with ListIdentifiers" do
        get :index, :format => 'oai', :verb => 'ListIdentifiers'
        assigns(:manifestations).should_not be_nil
        response.should render_template("manifestations/list_identifiers")
      end

      it "assigns all manifestations as @manifestations in oai format with GetRecord without identifier" do
        get :index, :format => 'oai', :verb => 'GetRecord'
        assigns(:manifestations).should be_nil
        assigns(:manifestation).should be_nil
        response.should render_template('manifestations/index')
      end

      it "assigns all manifestations as @manifestations in oai format with GetRecord with identifier" do
        get :index, :format => 'oai', :verb => 'GetRecord', :identifier => 'oai:localhost:manifestations-1'
        assigns(:manifestations).should be_nil
        assigns(:manifestation).should_not be_nil
        response.should render_template('manifestations/show')
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
enju_oai-0.1.0.pre17 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre16 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre15 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre14 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre13 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre12 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre11 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre10 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre9 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre8 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre7 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre6 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre5 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre4 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre3 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre2 spec/controllers/manifestations_controller_spec.rb
enju_oai-0.1.0.pre spec/controllers/manifestations_controller_spec.rb
enju_oai-0.0.4 spec/controllers/manifestations_controller_spec.rb