summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-03-27 15:34:45 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-03-27 18:45:36 -0400
commit90e802cd968371d40fe07a0b788165d2a035e927 (patch)
tree901f0e2695a55a682dcae6a9e3aa5661fc5ca3fd
parentd281835ac6bb8e2e2e020ce283944209b466a490 (diff)
downloadgitlab-ce-90e802cd968371d40fe07a0b788165d2a035e927.tar.gz
Use `:empty_project` where possible in policy specs
-rw-r--r--spec/policies/issue_policy_spec.rb2
-rw-r--r--spec/policies/project_policy_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/policies/issue_policy_spec.rb b/spec/policies/issue_policy_spec.rb
index 7591bfd1471..2905d5b26a5 100644
--- a/spec/policies/issue_policy_spec.rb
+++ b/spec/policies/issue_policy_spec.rb
@@ -5,7 +5,7 @@ describe IssuePolicy, models: true do
describe '#rules' do
context 'using a regular issue' do
- let(:project) { create(:project, :public) }
+ let(:project) { create(:empty_project, :public) }
let(:issue) { create(:issue, project: project) }
let(:policies) { described_class.abilities(user, issue).to_set }
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index 0a5edf35f59..064847ee3dc 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -74,7 +74,7 @@ describe ProjectPolicy, models: true 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(:project, :private)
+ project = create(:empty_project, :private)
issue = create(:issue, project: project)
user = issue.author