Sha256: e28794ca0b0eef6305e670e754539d28219ffcf429c1e69492c7d563bcec8705
Contents?: true
Size: 765 Bytes
Versions: 10
Compression:
Stored size: 765 Bytes
Contents
describe "citations routes", type: :routing do routes { Hyrax::Engine.routes } context "for works" do it 'routes to the controller' do expect(get: '/works/7/citation').to route_to(controller: 'hyrax/citations', action: 'work', id: '7') end it 'builds a url' do expect(url_for(controller: 'hyrax/citations', action: 'work', id: '7', only_path: true)).to eql('/works/7/citation') end end context "for files" do it 'routes to the controller' do expect(get: '/files/7/citation').to route_to(controller: 'hyrax/citations', action: 'file', id: '7') end it 'builds a url' do expect(url_for(controller: 'hyrax/citations', action: 'file', id: '7', only_path: true)).to eql('/files/7/citation') end end end
Version data entries
10 entries across 10 versions & 2 rubygems