diff options
Diffstat (limited to 'spec/features/security/project/public_access_spec.rb')
-rw-r--r-- | spec/features/security/project/public_access_spec.rb | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index 59655b0c31a..d45e1dbc09b 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -13,7 +13,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path" do - subject { namespace_project_path(project.namespace, project) } + subject { project_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -27,7 +27,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/tree/master" do - subject { namespace_project_tree_path(project.namespace, project, project.repository.root_ref) } + subject { project_tree_path(project, project.repository.root_ref) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -41,7 +41,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/commits/master" do - subject { namespace_project_commits_path(project.namespace, project, project.repository.root_ref, limit: 1) } + subject { project_commits_path(project, project.repository.root_ref, limit: 1) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -55,7 +55,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/commit/:sha" do - subject { namespace_project_commit_path(project.namespace, project, project.repository.commit) } + subject { project_commit_path(project, project.repository.commit) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -69,7 +69,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/compare" do - subject { namespace_project_compare_index_path(project.namespace, project) } + subject { project_compare_index_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -83,7 +83,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/settings/members" do - subject { namespace_project_settings_members_path(project.namespace, project) } + subject { project_settings_members_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -97,7 +97,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/settings/ci_cd" do - subject { namespace_project_settings_ci_cd_path(project.namespace, project) } + subject { project_settings_ci_cd_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -111,7 +111,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/settings/repository" do - subject { namespace_project_settings_repository_path(project.namespace, project) } + subject { project_settings_repository_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -125,7 +125,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/pipelines" do - subject { namespace_project_pipelines_path(project.namespace, project) } + subject { project_pipelines_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -140,7 +140,7 @@ describe "Public Project Access", feature: true do describe "GET /:project_path/pipelines/:id" do let(:pipeline) { create(:ci_pipeline, project: project) } - subject { namespace_project_pipeline_path(project.namespace, project, pipeline) } + subject { project_pipeline_path(project, pipeline) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -154,7 +154,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/builds" do - subject { namespace_project_jobs_path(project.namespace, project) } + subject { project_jobs_path(project) } context "when allowed for public" do before do @@ -192,7 +192,7 @@ describe "Public Project Access", feature: true do describe "GET /:project_path/builds/:id" do let(:pipeline) { create(:ci_pipeline, project: project) } let(:build) { create(:ci_build, pipeline: pipeline) } - subject { namespace_project_job_path(project.namespace, project, build.id) } + subject { project_job_path(project, build.id) } context "when allowed for public" do before do @@ -230,7 +230,7 @@ describe "Public Project Access", feature: true do describe 'GET /:project_path/builds/:id/trace' do let(:pipeline) { create(:ci_pipeline, project: project) } let(:build) { create(:ci_build, pipeline: pipeline) } - subject { trace_namespace_project_job_path(project.namespace, project, build.id) } + subject { trace_project_job_path(project, build.id) } context 'when allowed for public' do before do @@ -266,7 +266,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/pipeline_schedules" do - subject { namespace_project_pipeline_schedules_path(project.namespace, project) } + subject { project_pipeline_schedules_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -280,7 +280,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/environments" do - subject { namespace_project_environments_path(project.namespace, project) } + subject { project_environments_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -295,7 +295,7 @@ describe "Public Project Access", feature: true do describe "GET /:project_path/environments/:id" do let(:environment) { create(:environment, project: project) } - subject { namespace_project_environment_path(project.namespace, project, environment) } + subject { project_environment_path(project, environment) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -310,7 +310,7 @@ describe "Public Project Access", feature: true do describe "GET /:project_path/environments/:id/deployments" do let(:environment) { create(:environment, project: project) } - subject { namespace_project_environment_deployments_path(project.namespace, project, environment) } + subject { project_environment_deployments_path(project, environment) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -324,7 +324,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/environments/new" do - subject { new_namespace_project_environment_path(project.namespace, project) } + subject { new_project_environment_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -340,7 +340,7 @@ describe "Public Project Access", feature: true do describe "GET /:project_path/blob" do let(:commit) { project.repository.commit } - subject { namespace_project_blob_path(project.namespace, project, File.join(commit.id, '.gitignore')) } + subject { project_blob_path(project, File.join(commit.id, '.gitignore')) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -353,7 +353,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/edit" do - subject { edit_namespace_project_path(project.namespace, project) } + subject { edit_project_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -367,7 +367,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/deploy_keys" do - subject { namespace_project_deploy_keys_path(project.namespace, project) } + subject { project_deploy_keys_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -381,7 +381,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/issues" do - subject { namespace_project_issues_path(project.namespace, project) } + subject { project_issues_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -396,7 +396,7 @@ describe "Public Project Access", feature: true do describe "GET /:project_path/issues/:id/edit" do let(:issue) { create(:issue, project: project) } - subject { edit_namespace_project_issue_path(project.namespace, project, issue) } + subject { edit_project_issue_path(project, issue) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -410,7 +410,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/snippets" do - subject { namespace_project_snippets_path(project.namespace, project) } + subject { project_snippets_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -424,7 +424,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/snippets/new" do - subject { new_namespace_project_snippet_path(project.namespace, project) } + subject { new_project_snippet_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -438,7 +438,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/merge_requests" do - subject { namespace_project_merge_requests_path(project.namespace, project) } + subject { project_merge_requests_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -452,7 +452,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/merge_requests/new" do - subject { namespace_project_new_merge_request_path(project.namespace, project) } + subject { project_new_merge_request_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -466,7 +466,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/branches" do - subject { namespace_project_branches_path(project.namespace, project) } + subject { project_branches_path(project) } before do # Speed increase @@ -485,7 +485,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/tags" do - subject { namespace_project_tags_path(project.namespace, project) } + subject { project_tags_path(project) } before do # Speed increase @@ -504,7 +504,7 @@ describe "Public Project Access", feature: true do end describe "GET /:project_path/settings/integrations" do - subject { namespace_project_settings_integrations_path(project.namespace, project) } + subject { project_settings_integrations_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -526,7 +526,7 @@ describe "Public Project Access", feature: true do project.container_repositories << container_repository end - subject { namespace_project_container_registry_index_path(project.namespace, project) } + subject { project_container_registry_index_path(project) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } |