diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-18 16:52:55 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-24 15:06:59 +0300 |
commit | 35a49922e66ed9dc55685163126e1bee0a4e3dec (patch) | |
tree | 57f58e6616deaf38490a45f01f5d6c897364985b /spec/factories/projects.rb | |
parent | aeed6b5a34e2c1c98a374e6c6178d84e07779531 (diff) |
Allow admins to push to empty repos
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r-- | spec/factories/projects.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 1ae6152a1f0..803498d3b19 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -151,6 +151,13 @@ FactoryBot.define do end end + trait :stubbed_repository do + after(:build) do |project| + allow(project).to receive(:empty_repo?).and_return(false) + allow(project.repository).to receive(:empty?).and_return(false) + end + end + trait :wiki_repo do after(:create) do |project| raise 'Failed to create wiki repository!' unless project.create_wiki |