summaryrefslogtreecommitdiff
path: root/spec/factories/deployments.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-14 13:51:12 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-14 13:51:12 +0200
commit3ade826065f38e3734090cf34fbfc28b68ba79d0 (patch)
tree8894c90dc892086df16782f2c54ca8f6b8b4adb6 /spec/factories/deployments.rb
parente8f09f02bf8b0053f276a8e5ce0bdd18c621a1a3 (diff)
downloadgitlab-ce-3ade826065f38e3734090cf34fbfc28b68ba79d0.tar.gz
Add specs for models and services
Diffstat (limited to 'spec/factories/deployments.rb')
-rw-r--r--spec/factories/deployments.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/deployments.rb b/spec/factories/deployments.rb
new file mode 100644
index 00000000000..f335a111a7d
--- /dev/null
+++ b/spec/factories/deployments.rb
@@ -0,0 +1,12 @@
+FactoryGirl.define do
+ factory :deployment, class: Deployment do
+ sha '97de212e80737a608d939f648d959671fb0a0142'
+ ref 'master'
+
+ environment factory: :environment
+
+ after(:build) do |deployment, evaluator|
+ deployment.project = deployment.environment.project
+ end
+ end
+end