Sha256: 40e2cd5c1e1798813819ef591b78d89897e571bc936522221862f25c5d19588c

Contents?: true

Size: 814 Bytes

Versions: 5

Compression:

Stored size: 814 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
      { :get => "/catalog/111/librarian_view" }.should route_to(:controller => 'catalog', :action => 'librarian_view', :id => "111")
      { :get => librarian_view_catalog_path('111') }.should route_to(:controller => 'catalog', :action => 'librarian_view', :id => "111")
    end
    it "should map {:controller => 'catalog', :action => 'endnote'} to /catalog/endnote" do
      { :get => "/catalog/endnote" }.should route_to(:controller => 'catalog', :action => 'endnote')
      { :get => endnote_catalog_path }.should route_to(:controller => 'catalog', :action => 'endnote')
    end
  end
end


Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
blacklight-marc-5.4.0 spec/routing/routes_spec.rb
blacklight-marc-5.0.0 spec/routing/routes_spec.rb
blacklight_marc-0.0.9 spec/routing/routes_spec.rb
blacklight_marc-0.0.8 spec/routing/routes_spec.rb
blacklight_marc-0.0.7 spec/routing/routes_spec.rb