Sha256: abb1c42a30aa3f669308d057ba27642ca66971bcabde905238d2f61da63bdf47

Contents?: true

Size: 733 Bytes

Versions: 10

Compression:

Stored size: 733 Bytes

Contents

describe "stats routes", type: :routing do
  routes { Hyrax::Engine.routes }

  context "for works" do
    it 'routes to the controller' do
      expect(get: '/works/7/stats').to route_to(controller: 'hyrax/stats', action: 'work', id: '7')
    end
    it 'builds a url' do
      expect(url_for(controller: 'hyrax/stats', action: 'work', id: '7', only_path: true)).to eql('/works/7/stats')
    end
  end

  context "for files" do
    it 'routes to the controller' do
      expect(get: '/files/7/stats').to route_to(controller: 'hyrax/stats', action: 'file', id: '7')
    end
    it 'builds a url' do
      expect(url_for(controller: 'hyrax/stats', action: 'file', id: '7', only_path: true)).to eql('/files/7/stats')
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 spec/routing/stats_route_spec.rb
hyrax-1.1.0 spec/routing/stats_route_spec.rb
hyrax-1.0.5 spec/routing/stats_route_spec.rb
hyrax-1.0.4 spec/routing/stats_route_spec.rb
hyrax-1.0.3 spec/routing/stats_route_spec.rb
hyrax-1.0.2 spec/routing/stats_route_spec.rb
hyrax-1.0.1 spec/routing/stats_route_spec.rb
hyrax-1.0.0.rc2 spec/routing/stats_route_spec.rb
hyrax-1.0.0.rc1 spec/routing/stats_route_spec.rb
test_hyrax-0.0.1.alpha spec/routing/stats_route_spec.rb