diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-24 12:01:34 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-24 12:01:34 +0300 |
commit | 0aefb51693747a06a3e9ecd5c7a29e14a5ac0383 (patch) | |
tree | 1e109048dc85bd0d62bb5d5827c7379ea1ea3f87 /spec/factories | |
parent | 5505795ed2e65da20a896b67422a075515552a35 (diff) | |
parent | 883488e0b2adda7dad93334f17f3895f05a7c587 (diff) |
Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (97 commits)
Bulk update sidebar UI polish
Fix margin in mini graph for commits box
Add space between words in language dropdown
Fix support for old CI API when image or services are not specified
Short-circuit build coverage extraction for empty regexes
Update VERSION to 9.5.0-pre
Update CHANGELOG.md for 9.4.0
Compress gitlab svg logo
Fix the gcovr coverage regex by removing line separators before scanning
Capitalize Sidekiq word in dev doc
Add 1px to breadcrumbs min height
Update nginx docs
Use custom font SVG for logo
Port spinach tests to rspec feature specs
Merge branch 'fix-re2-infinite-loop-nick' into 'security-9-3'
Copy-edit background migrations guidelines
Add Traditional Chinese in Taiwan translations of Pipeline Schedules
Fix new project selectors in GitLab QA
Reword success to passing for pipeline badges
Rename build to pipeline for status badges
...
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/ci/builds.rb | 6 | ||||
-rw-r--r-- | spec/factories/project_hooks.rb | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index a77f01ecb00..5bba1dec7db 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -84,6 +84,10 @@ FactoryGirl.define do success end + trait :retried do + retried true + end + trait :cancelable do pending end @@ -106,7 +110,7 @@ FactoryGirl.define do end after(:build) do |build, evaluator| - build.project = build.pipeline.project + build.project ||= build.pipeline.project end factory :ci_not_started_build do diff --git a/spec/factories/project_hooks.rb b/spec/factories/project_hooks.rb index cd754ea235f..d754e980931 100644 --- a/spec/factories/project_hooks.rb +++ b/spec/factories/project_hooks.rb @@ -2,6 +2,7 @@ FactoryGirl.define do factory :project_hook do url { generate(:url) } enable_ssl_verification false + project factory: :empty_project trait :token do token { SecureRandom.hex(10) } |