summaryrefslogtreecommitdiff
path: root/spec/support/services
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-08-01 14:51:52 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-08-01 14:51:52 -0400
commit9513bd18c43b749c8856d6ad89635d97c8fb73b5 (patch)
treeb55d7fb920f0d6a8e10eabae1cafa5126fa03203 /spec/support/services
parent4c77c30fbfb3734fd893f7cfe540fa595ea6539c (diff)
downloadgitlab-ce-9513bd18c43b749c8856d6ad89635d97c8fb73b5.tar.gz
Ensure all project factories use `:repository` trait or `:empty_project`rs-empty_project-cleanup
Diffstat (limited to 'spec/support/services')
-rw-r--r--spec/support/services/migrate_to_ghost_user_service_shared_examples.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/support/services/migrate_to_ghost_user_service_shared_examples.rb b/spec/support/services/migrate_to_ghost_user_service_shared_examples.rb
index 855051921f0..bbb63a08374 100644
--- a/spec/support/services/migrate_to_ghost_user_service_shared_examples.rb
+++ b/spec/support/services/migrate_to_ghost_user_service_shared_examples.rb
@@ -3,7 +3,14 @@ require "spec_helper"
shared_examples "migrating a deleted user's associated records to the ghost user" do |record_class, fields|
record_class_name = record_class.to_s.titleize.downcase
- let(:project) { create(:project) }
+ let(:project) do
+ case record_class
+ when MergeRequest
+ create(:project, :repository)
+ else
+ create(:empty_project)
+ end
+ end
before do
project.add_developer(user)