Commit 60045195 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fixed tests, renamed files and methods

parent 8ffe586b
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
new gl.ProtectedBranchCreate(); new gl.ProtectedBranchCreate();
new gl.ProtectedBranchEditList(); new gl.ProtectedBranchEditList();
break; break;
case 'projects:ci_cd_pipelines:show': case 'projects:ci_cd:show':
new gl.ProjectVariables(); new gl.ProjectVariables();
break; break;
case 'ci:lints:create': case 'ci:lints:create':
......
...@@ -4,6 +4,10 @@ class Projects::RunnersController < Projects::ApplicationController ...@@ -4,6 +4,10 @@ class Projects::RunnersController < Projects::ApplicationController
layout 'project_settings' layout 'project_settings'
def index
redirect_to namespace_project_settings_ci_cd_path(@project.namespace, @project)
end
def edit def edit
end end
......
...@@ -5,7 +5,7 @@ module Projects ...@@ -5,7 +5,7 @@ module Projects
def show def show
define_runners_variables define_runners_variables
define_project_variables_variables define_secret_variables
define_triggers_variables define_triggers_variables
define_badges_variables define_badges_variables
end end
...@@ -20,7 +20,7 @@ module Projects ...@@ -20,7 +20,7 @@ module Projects
@shared_runners_count = @shared_runners.count(:all) @shared_runners_count = @shared_runners.count(:all)
end end
def define_project_variables_variables def define_secret_variables
@variable = Ci::Variable.new @variable = Ci::Variable.new
end end
......
...@@ -215,4 +215,8 @@ module GitlabRoutingHelper ...@@ -215,4 +215,8 @@ module GitlabRoutingHelper
def project_settings_members_path(project, *args) def project_settings_members_path(project, *args)
namespace_project_settings_members_path(project.namespace, project, *args) namespace_project_settings_members_path(project.namespace, project, *args)
end end
def project_settings_ci_cd_path(project, *args)
namespace_project_settings_ci_cd_path(project.namespace, project, *args)
end
end end
require('spec_helper') require('spec_helper')
describe Projects::Settings::CiCdPipelinesController do describe Projects::Settings::CiCdController do
let(:project) { create(:empty_project, :public, :access_requestable) } let(:project) { create(:empty_project, :public, :access_requestable) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
...@@ -82,6 +82,20 @@ describe "Private Project Access", feature: true do ...@@ -82,6 +82,20 @@ describe "Private Project Access", feature: true do
it { is_expected.to be_denied_for(:visitor) } it { is_expected.to be_denied_for(:visitor) }
end 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 describe "GET /:project_path/settings/ci_cd" do
subject { namespace_project_settings_ci_cd_path(project.namespace, project) } subject { namespace_project_settings_ci_cd_path(project.namespace, project) }
......
...@@ -7,7 +7,7 @@ describe 'Triggers' do ...@@ -7,7 +7,7 @@ describe 'Triggers' do
before do before do
@project = FactoryGirl.create :empty_project @project = FactoryGirl.create :empty_project
@project.team << [user, :master] @project.team << [user, :master]
visit namespace_project_triggers_path(@project.namespace, @project) visit namespace_project_settings_ci_cd_path(@project.namespace, @project)
end end
context 'create a trigger' do context 'create a trigger' do
......
...@@ -10,7 +10,7 @@ describe 'Project variables', js: true do ...@@ -10,7 +10,7 @@ describe 'Project variables', js: true do
project.team << [user, :master] project.team << [user, :master]
project.variables << variable project.variables << variable
visit namespace_project_variables_path(project.namespace, project) visit namespace_project_settings_ci_cd_path(project.namespace, project)
end end
it 'shows list of variables' do 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