Sha256: 0e164cc88cbbc62a9fe4c5ff3f5a0fabd2dee3741bbbdaafbc6a807770f9a5a4

Contents?: true

Size: 842 Bytes

Versions: 5

Compression:

Stored size: 842 Bytes

Contents

require 'spec_helper'

describe "Routing" do
  describe "Paths Generated by Custom Routes:" do
    it "should map {:controller => 'catalog', :id => '111', :action => 'librarian_view'} to /catalog/111/librarian_view" do
      expect({ :get => "/catalog/111/librarian_view" }).to route_to(:controller => 'catalog', :action => 'librarian_view', :id => "111")
      expect({ :get => librarian_view_solr_document_path('111') }).to route_to(:controller => 'catalog', :action => 'librarian_view', :id => "111")
    end
    it "should map {:controller => 'catalog', :action => 'endnote'} to /catalog/endnote" do
      expect({ :get => "/catalog/endnote" }).to route_to(:controller => 'catalog', :action => 'endnote')
      expect({ :get => endnote_solr_document_path }).to route_to(:controller => 'catalog', :action => 'endnote')
    end
  end
end


Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-marc-6.3.0 spec/routing/routes_spec.rb
blacklight-marc-6.2.0 spec/routing/routes_spec.rb
blacklight-marc-6.1.1 spec/routing/routes_spec.rb
blacklight-marc-6.1.0 spec/routing/routes_spec.rb
blacklight-marc-6.0.0 spec/routing/routes_spec.rb