diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-01 21:51:52 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-01 21:51:52 +0300 |
commit | 9513bd18c43b749c8856d6ad89635d97c8fb73b5 (patch) | |
tree | b55d7fb920f0d6a8e10eabae1cafa5126fa03203 /spec/support/services | |
parent | 4c77c30fbfb3734fd893f7cfe540fa595ea6539c (diff) |
Ensure all project factories use `:repository` trait or `:empty_project`
Diffstat (limited to 'spec/support/services')
-rw-r--r-- | spec/support/services/migrate_to_ghost_user_service_shared_examples.rb | 9 |
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) |