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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix upsale routes with new show action
Oliver Günther03cb319c18fb
diff --git a/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb b/modules/team_planner/app/controllers/team_planner/team_planner_controller.rbindex 8b8831b248e..c230a21af5c 100644--- a/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb+++ b/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb@@ -3,7 +3,7 @@ module ::TeamPlannerinclude EnterpriseTrialHelperbefore_action :find_optional_projectbefore_action :authorize- before_action :require_ee_token, only: %i[index]+ before_action :require_ee_token, except: %i[upsale]before_action :find_plan_view, only: %i[destroy]menu_item :team_planner_viewdiff --git a/modules/team_planner/spec/features/team_planner_upsale_spec.rb b/modules/team_planner/spec/features/team_planner_upsale_spec.rbnew file mode 100644index 00000000000..65b3534ebcf--- /dev/null+++ b/modules/team_planner/spec/features/team_planner_upsale_spec.rb@@ -0,0 +1,56 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++require 'spec_helper'+require_relative './shared_context'++describe 'Team planner index', type: :feature, js: true do+ include_context 'with team planner full access'++ let(:current_user) { user }++ before do+ login_as current_user+ end++ it 'redirects routes to upsale' do+ visit project_team_planners_path(project)++ expect(page).to have_text 'Upgrade now'++ click_on 'Create new planner'++ expect(page).to have_text 'Upgrade now'++ visit project_team_planner_path(project, id: 'new')++ expect(page).to have_text 'Upgrade now'+ end+end