diff options
Diffstat (limited to 'spec/features/security/project/snippet')
3 files changed, 18 insertions, 18 deletions
diff --git a/spec/features/security/project/snippet/internal_access_spec.rb b/spec/features/security/project/snippet/internal_access_spec.rb index 2659b3ee3ec..2420caa88c4 100644 --- a/spec/features/security/project/snippet/internal_access_spec.rb +++ b/spec/features/security/project/snippet/internal_access_spec.rb @@ -9,7 +9,7 @@ describe "Internal Project Snippets Access", feature: true do let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) } 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) } @@ -23,7 +23,7 @@ describe "Internal Project Snippets 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) } @@ -38,7 +38,7 @@ describe "Internal Project Snippets Access", feature: true do describe "GET /:project_path/snippets/:id" do context "for an internal snippet" do - subject { namespace_project_snippet_path(project.namespace, project, internal_snippet) } + subject { project_snippet_path(project, internal_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -52,7 +52,7 @@ describe "Internal Project Snippets Access", feature: true do end context "for a private snippet" do - subject { namespace_project_snippet_path(project.namespace, project, private_snippet) } + subject { project_snippet_path(project, private_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -68,7 +68,7 @@ describe "Internal Project Snippets Access", feature: true do describe "GET /:project_path/snippets/:id/raw" do context "for an internal snippet" do - subject { raw_namespace_project_snippet_path(project.namespace, project, internal_snippet) } + subject { raw_project_snippet_path(project, internal_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -82,7 +82,7 @@ describe "Internal Project Snippets Access", feature: true do end context "for a private snippet" do - subject { raw_namespace_project_snippet_path(project.namespace, project, private_snippet) } + subject { raw_project_snippet_path(project, private_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } diff --git a/spec/features/security/project/snippet/private_access_spec.rb b/spec/features/security/project/snippet/private_access_spec.rb index 6eb9f163bd5..0b8548a675b 100644 --- a/spec/features/security/project/snippet/private_access_spec.rb +++ b/spec/features/security/project/snippet/private_access_spec.rb @@ -8,7 +8,7 @@ describe "Private Project Snippets Access", feature: true do let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) } 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) } @@ -22,7 +22,7 @@ describe "Private Project Snippets 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) } @@ -36,7 +36,7 @@ describe "Private Project Snippets Access", feature: true do end describe "GET /:project_path/snippets/:id for a private snippet" do - subject { namespace_project_snippet_path(project.namespace, project, private_snippet) } + subject { project_snippet_path(project, private_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -50,7 +50,7 @@ describe "Private Project Snippets Access", feature: true do end describe "GET /:project_path/snippets/:id/raw for a private snippet" do - subject { raw_namespace_project_snippet_path(project.namespace, project, private_snippet) } + subject { raw_project_snippet_path(project, private_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } diff --git a/spec/features/security/project/snippet/public_access_spec.rb b/spec/features/security/project/snippet/public_access_spec.rb index f3329d0bc96..153f8f964a6 100644 --- a/spec/features/security/project/snippet/public_access_spec.rb +++ b/spec/features/security/project/snippet/public_access_spec.rb @@ -10,7 +10,7 @@ describe "Public Project Snippets Access", feature: true do let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) } 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) } @@ -24,7 +24,7 @@ describe "Public Project Snippets 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) } @@ -39,7 +39,7 @@ describe "Public Project Snippets Access", feature: true do describe "GET /:project_path/snippets/:id" do context "for a public snippet" do - subject { namespace_project_snippet_path(project.namespace, project, public_snippet) } + subject { project_snippet_path(project, public_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -53,7 +53,7 @@ describe "Public Project Snippets Access", feature: true do end context "for an internal snippet" do - subject { namespace_project_snippet_path(project.namespace, project, internal_snippet) } + subject { project_snippet_path(project, internal_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } @@ -67,7 +67,7 @@ describe "Public Project Snippets Access", feature: true do end context "for a private snippet" do - subject { namespace_project_snippet_path(project.namespace, project, private_snippet) } + subject { project_snippet_path(project, private_snippet) } 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 Snippets Access", feature: true do describe "GET /:project_path/snippets/:id/raw" do context "for a public snippet" do - subject { raw_namespace_project_snippet_path(project.namespace, project, public_snippet) } + subject { raw_project_snippet_path(project, public_snippet) } 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 Snippets Access", feature: true do end context "for an internal snippet" do - subject { raw_namespace_project_snippet_path(project.namespace, project, internal_snippet) } + subject { raw_project_snippet_path(project, internal_snippet) } 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 Snippets Access", feature: true do end context "for a private snippet" do - subject { raw_namespace_project_snippet_path(project.namespace, project, private_snippet) } + subject { raw_project_snippet_path(project, private_snippet) } it { is_expected.to be_allowed_for(:admin) } it { is_expected.to be_allowed_for(:owner).of(project) } |