Sha256: 266855f0d7178bc0dcaf1e1cffa96b90b3a8dbc68c08dc9db79ffcd7ee75b552
Contents?: true
Size: 954 Bytes
Versions: 2
Compression:
Stored size: 954 Bytes
Contents
require 'spec_helper' RSpec.describe 'Rails::Service::Engine routes', type: :routing do routes { Rails::Service::Engine.routes } describe '/_status' do it 'index' do expect(get: '/_status'). to route_to(controller: 'rails/service/status', action: 'index') end it 'custom check' do expect(get: '/_status/custom_check'). to route_to(controller: 'rails/service/status', action: 'custom_check') end end # TODO: Figure out how to stub request/or mock constraint pending '/_admin' do it 'index' do expect(get: '/_admin'). to route_to(controller: 'rails/service/admin', action: 'environment') end it 'custom page' do expect(get: '/_admin/custom_page'). to route_to(controller: 'rails/service/admin', action: 'custom_page') expect(post: '/_admin/custom_page'). to route_to(controller: 'rails/service/admin', action: 'custom_page') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails-service-0.2.0 | spec/routes_spec.rb |
rails-service-0.1.0 | spec/routes_spec.rb |