Add routing to StatisticsController
This commit is contained in:
parent
99bfe6ed70
commit
b307abfc43
|
|
@ -8,6 +8,8 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
resources :matches, only: %i[show update]
|
resources :matches, only: %i[show update]
|
||||||
resources :teams, only: %i[show update]
|
resources :teams, only: %i[show update]
|
||||||
resources :tournaments
|
resources :tournaments do
|
||||||
|
resources :statistics, only: %i[index]
|
||||||
|
end
|
||||||
resources :match_scores, only: %i[show update]
|
resources :match_scores, only: %i[show update]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe StatisticsController, type: :routing do
|
||||||
|
describe 'routing' do
|
||||||
|
it 'routes to #index' do
|
||||||
|
expect(get: '/tournaments/1/statistics').to route_to('statistics#index', tournament_id: '1')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue