summaryrefslogtreecommitdiff
path: root/spec/policies
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-08-02 15:55:11 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-08-02 17:47:31 -0400
commit72a7b30c9f363063449b28aa9efc3a26a1752f9f (patch)
tree173a716da52260e57a73c4a6d739fe055898d556 /spec/policies
parente2c3dca371f8dca8814a5924fe8ed271f0ec6399 (diff)
downloadgitlab-ce-72a7b30c9f363063449b28aa9efc3a26a1752f9f.tar.gz
Change all `:empty_project` to `:project`rs-empty_project-default
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/ci/build_policy_spec.rb6
-rw-r--r--spec/policies/ci/trigger_policy_spec.rb2
-rw-r--r--spec/policies/issue_policy_spec.rb4
-rw-r--r--spec/policies/project_policy_spec.rb8
-rw-r--r--spec/policies/project_snippet_policy_spec.rb2
5 files changed, 11 insertions, 11 deletions
diff --git a/spec/policies/ci/build_policy_spec.rb b/spec/policies/ci/build_policy_spec.rb
index 11a4c3c742e..8e1bc3d1543 100644
--- a/spec/policies/ci/build_policy_spec.rb
+++ b/spec/policies/ci/build_policy_spec.rb
@@ -17,7 +17,7 @@ describe Ci::BuildPolicy do
describe '#rules' do
context 'when user does not have access to the project' do
- let(:project) { create(:empty_project, :private) }
+ let(:project) { create(:project, :private) }
context 'when public builds are enabled' do
it 'does not include ability to read build' do
@@ -35,7 +35,7 @@ describe Ci::BuildPolicy do
end
context 'when anonymous user has access to the project' do
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
context 'when public builds are enabled' do
it 'includes ability to read build' do
@@ -53,7 +53,7 @@ describe Ci::BuildPolicy do
end
context 'when team member has access to the project' do
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
context 'team member is a guest' do
before do
diff --git a/spec/policies/ci/trigger_policy_spec.rb b/spec/policies/ci/trigger_policy_spec.rb
index 3d3e3d3755b..be40dbb2aa9 100644
--- a/spec/policies/ci/trigger_policy_spec.rb
+++ b/spec/policies/ci/trigger_policy_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Ci::TriggerPolicy do
let(:user) { create(:user) }
- let(:project) { create(:empty_project) }
+ let(:project) { create(:project) }
let(:trigger) { create(:ci_trigger, project: project, owner: owner) }
let(:policies) do
diff --git a/spec/policies/issue_policy_spec.rb b/spec/policies/issue_policy_spec.rb
index 279b96fb2af..be4c24c727c 100644
--- a/spec/policies/issue_policy_spec.rb
+++ b/spec/policies/issue_policy_spec.rb
@@ -14,7 +14,7 @@ describe IssuePolicy do
context 'a private project' do
let(:non_member) { create(:user) }
- let(:project) { create(:empty_project, :private) }
+ let(:project) { create(:project, :private) }
let(:issue) { create(:issue, project: project, assignees: [assignee], author: author) }
let(:issue_no_assignee) { create(:issue, project: project) }
@@ -109,7 +109,7 @@ describe IssuePolicy do
end
context 'a public project' do
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project, assignees: [assignee], author: author) }
let(:issue_no_assignee) { create(:issue, project: project) }
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index 1f51ced1beb..4dbaf7fb025 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -7,7 +7,7 @@ describe ProjectPolicy do
let(:master) { create(:user) }
let(:owner) { create(:user) }
let(:admin) { create(:admin) }
- let(:project) { create(:empty_project, :public, namespace: owner.namespace) }
+ let(:project) { create(:project, :public, namespace: owner.namespace) }
let(:guest_permissions) do
%i[
@@ -82,7 +82,7 @@ describe ProjectPolicy do
end
it 'does not include the read_issue permission when the issue author is not a member of the private project' do
- project = create(:empty_project, :private)
+ project = create(:project, :private)
issue = create(:issue, project: project)
user = issue.author
@@ -129,7 +129,7 @@ describe ProjectPolicy do
context 'when a project has pending invites, and the current user is anonymous' do
let(:group) { create(:group, :public) }
- let(:project) { create(:empty_project, :public, namespace: group) }
+ let(:project) { create(:project, :public, namespace: group) }
let(:user_permissions) { [:create_project, :create_issue, :create_note, :upload_file] }
let(:anonymous_permissions) { guest_permissions - user_permissions }
@@ -146,7 +146,7 @@ describe ProjectPolicy do
end
context 'abilities for non-public projects' do
- let(:project) { create(:empty_project, namespace: owner.namespace) }
+ let(:project) { create(:project, namespace: owner.namespace) }
subject { described_class.new(current_user, project) }
diff --git a/spec/policies/project_snippet_policy_spec.rb b/spec/policies/project_snippet_policy_spec.rb
index bae35ee31c6..f0bf46c480a 100644
--- a/spec/policies/project_snippet_policy_spec.rb
+++ b/spec/policies/project_snippet_policy_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe ProjectSnippetPolicy do
let(:regular_user) { create(:user) }
let(:external_user) { create(:user, :external) }
- let(:project) { create(:empty_project, :public) }
+ let(:project) { create(:project, :public) }
let(:author_permissions) do
[