Commit 393801b7 authored by James Lopez's avatar James Lopez

Merge branch...

Merge branch '201763-some-examples-in-ee-spec-controllers-projects-tracings_controller_spec-rb-are-only-passing' into 'master'

Fix a flaky 'Projects::TracingsController' test

Closes #201763

See merge request gitlab-org/gitlab!24301
parents 2e2bbfb7 fdabcf35
......@@ -9,8 +9,10 @@ describe Projects::TracingsController do
shared_examples 'user with read access' do |visibility_level|
let(:project) { create(:project, visibility_level) }
%w[developer maintainer].each do |role|
context "with a #{visibility_level} project and #{role} role" do
before do
project.add_maintainer(user)
project.add_role(user, role)
end
it 'renders OK' do
......@@ -20,13 +22,16 @@ describe Projects::TracingsController do
expect(response).to render_template(:show)
end
end
end
end
shared_examples 'user without read access' do |visibility_level|
let(:project) { create(:project, visibility_level) }
%w[guest reporter developer].each do |role|
%w[guest reporter].each do |role|
context "with a #{visibility_level} project and #{role} role" do
before do
project.public_send("add_#{role}", user)
project.add_role(user, role)
end
it 'returns 404' do
......@@ -36,6 +41,7 @@ describe Projects::TracingsController do
end
end
end
end
describe 'with valid license' do
before do
......
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