diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-06-17 19:52:55 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-06-17 19:52:55 +0800 |
commit | 5174d6c1468c7c22c3ad98e6d3f7f5175d005635 (patch) | |
tree | c8e1a04d99dcd3b1a79b18497e3b33a6438ce1b3 /spec/factories | |
parent | 8a0aeab846f5c97ba56d34644834e38f2378c7ce (diff) | |
parent | faee4763f7a166772bb40945f82da4b25a95e7d5 (diff) | |
download | gitlab-ce-5174d6c1468c7c22c3ad98e6d3f7f5175d005635.tar.gz |
Merge remote-tracking branch 'upstream/master' into feature/runner-lock-on-project
* upstream/master: (337 commits)
Update CHANGELOG for !4659
Center the header logo for all Devise emails
Add previews for all customized Devise emails
Customize the Devise `unlock_instructions` email
Customize the Devise `reset_password_instructions` email
Customize the Devise `password_change` emails
Use gitlab-git 10.2.0
Use Git cached counters on project show page
Fix indentation scss-lint errors
Added title attribute to enties in tree view Closes #18353
Banzai::Filter::ExternalLinkFilter use XPath
Reduce queries in IssueReferenceFilter
Use gitlab_git 10.1.4
Fixed ordering in Project.find_with_namespace
Fix images in emails
Banzai::Filter::UploadLinkFilter use XPath
Turn Group#owners into a has_many association
Make project_id nullable
CHANGELOG [ci skip]
CHANGELOG [ci skip]
...
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/deployments.rb | 13 | ||||
-rw-r--r-- | spec/factories/environments.rb | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/spec/factories/deployments.rb b/spec/factories/deployments.rb new file mode 100644 index 00000000000..82591604fcb --- /dev/null +++ b/spec/factories/deployments.rb @@ -0,0 +1,13 @@ +FactoryGirl.define do + factory :deployment, class: Deployment do + sha '97de212e80737a608d939f648d959671fb0a0142' + ref 'master' + tag false + + environment factory: :environment + + after(:build) do |deployment, evaluator| + deployment.project = deployment.environment.project + end + end +end diff --git a/spec/factories/environments.rb b/spec/factories/environments.rb new file mode 100644 index 00000000000..07265c26ca3 --- /dev/null +++ b/spec/factories/environments.rb @@ -0,0 +1,7 @@ +FactoryGirl.define do + factory :environment, class: Environment do + sequence(:name) { |n| "environment#{n}" } + + project factory: :empty_project + end +end |