Skip to content

Commit

Permalink
add some routing specs with a format to verify Blacklight::Engine.con…
Browse files Browse the repository at this point in the history
…fig.identifier_constraint doesn't interfere
  • Loading branch information
barmintor committed May 3, 2022
1 parent be91884 commit 849ad04
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/routing/catalog_routing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
it "maps { :controller => 'catalog', :action => 'show', :id => 666 } to /catalog/666" do
expect(:get => "/catalog/666").to route_to(:controller => 'catalog', :action => 'show', :id => "666")
end
it "maps { :controller => 'catalog', :action => 'show', :id => 666, :format => 'json' } to /catalog/666.json" do
expect(:get => "/catalog/666.json").to route_to(:controller => 'catalog', :action => 'show', :id => "666", :format => 'json')
end
end

describe 'tracking' do
Expand All @@ -39,6 +42,10 @@
it "routes ids with a literal ':'" do
expect(post('/catalog/this:that/track')).to route_to('catalog#track', id: 'this:that')
end

it "routes ids with a literal ':'" do
expect(post('/catalog/this:that/track.json')).to route_to('catalog#track', id: 'this:that', format: 'json')
end
end


Expand Down

0 comments on commit 849ad04

Please sign in to comment.