From fdcb942e786125f1784b4b7f489b0a7584b818dc Mon Sep 17 00:00:00 2001 From: riggraz Date: Wed, 28 Aug 2019 18:54:25 +0200 Subject: [PATCH] Add route for roadmap and its tests --- config/routes.rb | 1 + spec/routing/static_pages_routing_spec.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 spec/routing/static_pages_routing_spec.rb diff --git a/config/routes.rb b/config/routes.rb index 2c7ba2ea..509a47c2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,6 @@ Rails.application.routes.draw do root to: 'static_pages#roadmap' + get '/roadmap', to: 'static_pages#roadmap' namespace :admin do root to: 'boards#index' diff --git a/spec/routing/static_pages_routing_spec.rb b/spec/routing/static_pages_routing_spec.rb new file mode 100644 index 00000000..2f235c3c --- /dev/null +++ b/spec/routing/static_pages_routing_spec.rb @@ -0,0 +1,13 @@ +require 'rails_helper' + +RSpec.describe 'static pages routing', :aggregate_failures, type: :routing do + it 'routes roadmap' do + expect(get: '/').to route_to( + controller: 'static_pages', action: 'roadmap' + ) + + expect(get: '/roadmap').to route_to( + controller: 'static_pages', action: 'roadmap' + ) + end +end \ No newline at end of file