Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Cover missing routes in routing spec

Aaron Contreras78d921a83798
diff --git a/modules/team_planner/spec/routing/team_planner_routing_spec.rb b/modules/team_planner/spec/routing/team_planner_routing_spec.rb
index e08b4faee99..8f0283994c5 100644
--- a/modules/team_planner/spec/routing/team_planner_routing_spec.rb
+++ b/modules/team_planner/spec/routing/team_planner_routing_spec.rb
@@ -29,6 +29,12 @@
require 'spec_helper'
RSpec.describe 'Team planner routing' do
+ it 'routes to team_planner#overview' do
+ expect(subject)
+ .to route(:get, '/team_planners')
+ .to(controller: 'team_planner/team_planner', action: :overview)
+ end
+
it 'routes to team_planner#index' do
expect(subject)
.to route(:get, '/projects/foobar/team_planners')
@@ -42,7 +48,13 @@ RSpec.describe 'Team planner routing' do
end
context 'with :project_id' do
- it 'routes to team_planner#new' do
+ it 'routes to team_planner#upsale' do
+ expect(subject)
+ .to route(:get, '/projects/foobar/team_planners/upsale')
+ .to(controller: 'team_planner/team_planner', action: :upsale, project_id: 'foobar')
+ end
+
+ it 'routes to team_planner#show' do
expect(subject)
.to route(:get, '/projects/foobar/team_planners/new')
.to(controller: 'team_planner/team_planner', action: :show, project_id: 'foobar')
@@ -50,6 +62,12 @@ RSpec.describe 'Team planner routing' do
end
context 'without :project_id' do
+ it 'routes to team_planner#upsale' do
+ expect(subject)
+ .to route(:get, '/team_planners/upsale')
+ .to(controller: 'team_planner/team_planner', action: :upsale)
+ end
+
it 'routes to team_planner#new' do
expect(subject)
.to route(:get, '/team_planners/new')