Commit 7a987cfe authored by Markus Koller's avatar Markus Koller

Merge branch 'fj-228686-improve-time-spec-feature-public-access-spec' into 'master'

Improving execution time for snippet feature spec public_access

See merge request gitlab-org/gitlab!36938
parents 9e9e3174 c005b643
...@@ -5,11 +5,10 @@ require 'spec_helper' ...@@ -5,11 +5,10 @@ require 'spec_helper'
RSpec.describe "Public Project Snippets Access" do RSpec.describe "Public Project Snippets Access" do
include AccessMatchers include AccessMatchers
let(:project) { create(:project, :public) } let_it_be(:project) { create(:project, :public) }
let_it_be(:public_snippet) { create(:project_snippet, :public, project: project, author: project.owner) }
let(:public_snippet) { create(:project_snippet, :public, project: project, author: project.owner) } 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,11 +5,10 @@ require 'spec_helper' ...@@ -5,11 +5,10 @@ require 'spec_helper'
RSpec.describe "Public Project Snippets Access" do RSpec.describe "Public Project Snippets Access" do
include AccessMatchers include AccessMatchers
let(:project) { create(:project, :public) } let_it_be(:project) { create(:project, :public) }
let_it_be(:public_snippet) { create(:project_snippet, :public, project: project, author: project.owner) }
let(:public_snippet) { create(:project_snippet, :public, project: project, author: project.owner) } 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