Commit 325cbf82 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '228692-fj-snippet-internal_access_spec' into 'master'

Improve project snippet internal access spec

See merge request gitlab-org/gitlab!38314
parents 4713621d a18e7488
...@@ -5,10 +5,9 @@ require 'spec_helper' ...@@ -5,10 +5,9 @@ require 'spec_helper'
RSpec.describe "Internal Project Snippets Access" do RSpec.describe "Internal Project Snippets Access" do
include AccessMatchers include AccessMatchers
let(:project) { create(:project, :internal) } let_it_be(:project) { create(:project, :internal) }
let_it_be(:internal_snippet) { create(:project_snippet, :internal, project: project, author: project.owner) }
let(:internal_snippet) { create(:project_snippet, :internal, project: project, author: project.owner) } let_it_be(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) }
let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) }
describe "GET /:project_path/snippets" do describe "GET /:project_path/snippets" do
subject { project_snippets_path(project) } subject { project_snippets_path(project) }
......
...@@ -5,10 +5,9 @@ require 'spec_helper' ...@@ -5,10 +5,9 @@ require 'spec_helper'
RSpec.describe "Internal Project Snippets Access" do RSpec.describe "Internal Project Snippets Access" do
include AccessMatchers include AccessMatchers
let(:project) { create(:project, :internal) } let_it_be(:project) { create(:project, :internal) }
let_it_be(:internal_snippet) { create(:project_snippet, :internal, project: project, author: project.owner) }
let(:internal_snippet) { create(:project_snippet, :internal, project: project, author: project.owner) } let_it_be(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) }
let(:private_snippet) { create(:project_snippet, :private, project: project, author: project.owner) }
describe "GET /:project_path/snippets" do describe "GET /:project_path/snippets" do
subject { project_snippets_path(project) } subject { project_snippets_path(project) }
......
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