Commit abe39684 authored by Robert Speicher's avatar Robert Speicher

Use `empty_project` where possible in spec/features/security

parent 56ae036e
......@@ -4,7 +4,7 @@ describe 'Internal Group access' do
include AccessMatchers
let(:group) { create(:group, :internal) }
let(:project) { create(:project, :internal, group: group) }
let(:project) { create(:empty_project, :internal, group: group) }
let(:project_guest) do
create(:user) do |user|
project.add_guest(user)
......@@ -49,6 +49,7 @@ describe 'Internal Group access' do
end
describe 'GET /groups/:path/merge_requests' do
let(:project) { create(:project, :internal, :repository, group: group) }
subject { merge_requests_group_path(group) }
it { is_expected.to be_allowed_for(:admin) }
......
......@@ -4,7 +4,7 @@ describe 'Private Group access' do
include AccessMatchers
let(:group) { create(:group, :private) }
let(:project) { create(:project, :private, group: group) }
let(:project) { create(:empty_project, :private, group: group) }
let(:project_guest) do
create(:user) do |user|
project.add_guest(user)
......@@ -49,6 +49,7 @@ describe 'Private Group access' do
end
describe 'GET /groups/:path/merge_requests' do
let(:project) { create(:project, :private, :repository, group: group) }
subject { merge_requests_group_path(group) }
it { is_expected.to be_allowed_for(:admin) }
......
......@@ -4,7 +4,7 @@ describe 'Public Group access' do
include AccessMatchers
let(:group) { create(:group, :public) }
let(:project) { create(:project, :public, group: group) }
let(:project) { create(:empty_project, :public, group: group) }
let(:project_guest) do
create(:user) do |user|
project.add_guest(user)
......@@ -49,6 +49,7 @@ describe 'Public Group access' do
end
describe 'GET /groups/:path/merge_requests' do
let(:project) { create(:project, :public, :repository, group: group) }
subject { merge_requests_group_path(group) }
it { is_expected.to be_allowed_for(:admin) }
......
......@@ -3,7 +3,7 @@ require 'spec_helper'
describe "Internal Project Access" do
include AccessMatchers
set(:project) { create(:project, :internal) }
set(:project) { create(:project, :internal, :repository) }
describe "Project should be internal" do
describe '#internal?' do
......
......@@ -3,7 +3,7 @@ require 'spec_helper'
describe "Private Project Access" do
include AccessMatchers
set(:project) { create(:project, :private, public_builds: false) }
set(:project) { create(:project, :private, :repository, public_builds: false) }
describe "Project should be private" do
describe '#private?' do
......
......@@ -3,7 +3,7 @@ require 'spec_helper'
describe "Public Project Access" do
include AccessMatchers
set(:project) { create(:project, :public) }
set(:project) { create(:project, :public, :repository) }
describe "Project should be public" do
describe '#public?' 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