From 3ade826065f38e3734090cf34fbfc28b68ba79d0 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 14 Jun 2016 13:51:12 +0200 Subject: Add specs for models and services --- spec/factories/deployments.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 spec/factories/deployments.rb (limited to 'spec/factories/deployments.rb') 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 -- cgit v1.2.1