summaryrefslogtreecommitdiff
path: root/spec/models/commit_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r--spec/models/commit_spec.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb
index da57109..d4a516b 100644
--- a/spec/models/commit_spec.rb
+++ b/spec/models/commit_spec.rb
@@ -159,19 +159,14 @@ describe Commit do
end
describe "create_deploy_builds" do
- before do
- job = FactoryGirl.create :job, project: project
- job1 = FactoryGirl.create :job, project: project
+ it "creates deploy build" do
FactoryGirl.create :job, job_type: :deploy, project: project
- FactoryGirl.create :build, commit: commit, status: :success, job: job
- FactoryGirl.create :build, commit: commit, status: :success, job: job1
project.reload
- end
- it "creates new build for deploy" do
commit.create_deploy_builds(commit.ref)
+ commit.builds.reload
- commit.builds.size.should == 3
+ commit.builds.size.should == 1
end
end
end