Improving execution time for snippet feature spec public_access

parent 0aad74c8
...@@ -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