Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2018-05-28 18:58:46 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-31 11:56:41 +0300
commitc0c5f896b79635343d3651b40bcb875413ceedd9 (patch)
tree92b9573ded4705d1e6611dccc0cbe4d36d942403 /spec/factories/ci/runners.rb
parent47c11248636ede9b50bc3b6b4ac5de850ed3e0a9 (diff)
Bring back deleted specs
Diffstat (limited to 'spec/factories/ci/runners.rb')
-rw-r--r--spec/factories/ci/runners.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/factories/ci/runners.rb b/spec/factories/ci/runners.rb
index c698b74c578..6fb621b5e51 100644
--- a/spec/factories/ci/runners.rb
+++ b/spec/factories/ci/runners.rb
@@ -36,6 +36,14 @@ FactoryBot.define do
end
end
+ trait :without_projects do
+ # we use that to create invalid runner:
+ # the one without projects
+ after(:create) do |runner, evaluator|
+ runner.runner_projects.delete_all
+ end
+ end
+
trait :inactive do
active false
end