Sha256: c18d07c2ddf9dfbf26aefa0adc82abefc9224a1e09c8635a33c4a02a06ffe36a
Contents?: true
Size: 741 Bytes
Versions: 16
Compression:
Stored size: 741 Bytes
Contents
describe "citations routes", type: :routing do routes { Sufia::Engine.routes } context "for works" do it 'routes to the controller' do expect(get: '/works/7/citation').to route_to(controller: 'citations', action: 'work', id: '7') end it 'builds a url' do expect(url_for(controller: '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: 'citations', action: 'file', id: '7') end it 'builds a url' do expect(url_for(controller: 'citations', action: 'file', id: '7', only_path: true)).to eql('/files/7/citation') end end end
Version data entries
16 entries across 16 versions & 1 rubygems