diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-02 18:29:57 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-02 18:29:57 -0700 |
commit | 1bb72f838cde2d7f3cfd3e55c2e189499ff0f1cb (patch) | |
tree | 93c7323ed78db8924e8953794df28aaef1402bdf /spec/models/commit_spec.rb | |
parent | 2aa77d14ef426e5f775cd3146883fdfc4f499b29 (diff) | |
parent | ecb57058b81f804f8548d6af35874136fa37743c (diff) | |
download | gitlab-ci-1bb72f838cde2d7f3cfd3e55c2e189499ff0f1cb.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ci
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r-- | spec/models/commit_spec.rb | 11 |
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 |