diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-26 12:23:34 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-26 12:23:40 +0100 |
commit | 271ad4e354d10c7ff59f57a1852c5a97e3621273 (patch) | |
tree | 206030579275244ac1529d9a1661fec876570f1e /spec | |
parent | bf30332ea8adf067b8c9aaad3b934749b7e6f71e (diff) | |
download | gitlab-ce-271ad4e354d10c7ff59f57a1852c5a97e3621273.tar.gz |
Fix CI badgefix-ci-badge
The previous code relied on having on ref stored in commit, however the ref was moved to the build.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/ci/image_for_build_service_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/services/ci/image_for_build_service_spec.rb b/spec/services/ci/image_for_build_service_spec.rb index d7242d684c6..cda7d0c4a51 100644 --- a/spec/services/ci/image_for_build_service_spec.rb +++ b/spec/services/ci/image_for_build_service_spec.rb @@ -4,8 +4,9 @@ module Ci describe ImageForBuildService do let(:service) { ImageForBuildService.new } let(:project) { FactoryGirl.create(:ci_project) } - let(:gl_project) { FactoryGirl.create(:empty_project, gitlab_ci_project: project) } - let(:commit) { FactoryGirl.create(:ci_commit, gl_project: gl_project, ref: 'master') } + let(:gl_project) { FactoryGirl.create(:project, gitlab_ci_project: project) } + let(:commit_sha) { gl_project.commit('master').sha } + let(:commit) { gl_project.ensure_ci_commit(commit_sha) } let(:build) { FactoryGirl.create(:ci_build, commit: commit) } describe :execute do |