BigW Consortium Gitlab

Commit 60045195 by Jose Ivan Vargas

Fixed tests, renamed files and methods

parent 8ffe586b
......@@ -259,7 +259,7 @@
new gl.ProtectedBranchCreate();
new gl.ProtectedBranchEditList();
break;
case 'projects:ci_cd_pipelines:show':
case 'projects:ci_cd:show':
new gl.ProjectVariables();
break;
case 'ci:lints:create':
......
......@@ -4,6 +4,10 @@ class Projects::RunnersController < Projects::ApplicationController
layout 'project_settings'
def index
redirect_to namespace_project_settings_ci_cd_path(@project.namespace, @project)
end
def edit
end
......
......@@ -5,7 +5,7 @@ module Projects
def show
define_runners_variables
define_project_variables_variables
define_secret_variables
define_triggers_variables
define_badges_variables
end
......@@ -20,7 +20,7 @@ module Projects
@shared_runners_count = @shared_runners.count(:all)
end
def define_project_variables_variables
def define_secret_variables
@variable = Ci::Variable.new
end
......
......@@ -215,4 +215,8 @@ module GitlabRoutingHelper
def project_settings_members_path(project, *args)
namespace_project_settings_members_path(project.namespace, project, *args)
end
def project_settings_ci_cd_path(project, *args)
namespace_project_settings_ci_cd_path(project.namespace, project, *args)
end
end
require('spec_helper')
describe Projects::Settings::CiCdPipelinesController do
describe Projects::Settings::CiCdController do
let(:project) { create(:empty_project, :public, :access_requestable) }
let(:user) { create(:user) }
......
......@@ -82,6 +82,20 @@ describe "Private Project Access", feature: true do
it { is_expected.to be_denied_for(:visitor) }
end
describe "GET /:project_path/settings/members" do
subject { namespace_project_settings_members_path(project.namespace, project) }
it { is_expected.to be_allowed_for(:admin) }
it { is_expected.to be_allowed_for(:owner).of(project) }
it { is_expected.to be_allowed_for(:master).of(project) }
it { is_expected.to be_allowed_for(:developer).of(project) }
it { is_expected.to be_allowed_for(:reporter).of(project) }
it { is_expected.to be_allowed_for(:guest).of(project) }
it { is_expected.to be_denied_for(:user) }
it { is_expected.to be_denied_for(:visitor) }
it { is_expected.to be_denied_for(:external) }
end
describe "GET /:project_path/settings/ci_cd" do
subject { namespace_project_settings_ci_cd_path(project.namespace, project) }
......
......@@ -7,7 +7,7 @@ describe 'Triggers' do
before do
@project = FactoryGirl.create :empty_project
@project.team << [user, :master]
visit namespace_project_triggers_path(@project.namespace, @project)
visit namespace_project_settings_ci_cd_path(@project.namespace, @project)
end
context 'create a trigger' do
......
......@@ -10,7 +10,7 @@ describe 'Project variables', js: true do
project.team << [user, :master]
project.variables << variable
visit namespace_project_variables_path(project.namespace, project)
visit namespace_project_settings_ci_cd_path(project.namespace, project)
end
it 'shows list of variables' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment