Sha256: c45f8dc78ea8cf070042b870eefc6cd5c39e9ea9da0170d0b1a652b61cbdaf6b

Contents?: true

Size: 830 Bytes

Versions: 2

Compression:

Stored size: 830 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_catalog_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_catalog_path }).to route_to(:controller => 'catalog', :action => 'endnote')
    end
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blacklight-marc-5.10.0 spec/routing/routes_spec.rb
blacklight-marc-5.5.0 spec/routing/routes_spec.rb