summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 16:22:26 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 16:22:26 +0200
commit20c7144ed20bad499b878425d5fbab408ad066b5 (patch)
tree8b25261fa12fc36abca7639664329724d2a4302d /spec/lib
parent8ce1896b46f893de62528e44172be8c128b27c9b (diff)
downloadgitlab-ce-20c7144ed20bad499b878425d5fbab408ad066b5.tar.gz
Rename all `[ci_]commit` to `[ci_]pipeline` in specs and features
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/ci/charts_spec.rb10
-rw-r--r--spec/lib/gitlab/badge/build_spec.rb5
2 files changed, 7 insertions, 8 deletions
diff --git a/spec/lib/ci/charts_spec.rb b/spec/lib/ci/charts_spec.rb
index 2be50edc347..9c6b4ea5086 100644
--- a/spec/lib/ci/charts_spec.rb
+++ b/spec/lib/ci/charts_spec.rb
@@ -4,19 +4,19 @@ describe Ci::Charts, lib: true do
context "build_times" do
before do
- @commit = FactoryGirl.create(:ci_commit)
- FactoryGirl.create(:ci_build, pipeline: @commit)
+ @pipeline = FactoryGirl.create(:ci_pipeline)
+ FactoryGirl.create(:ci_build, pipeline: @pipeline)
end
it 'should return build times in minutes' do
- chart = Ci::Charts::BuildTime.new(@commit.project)
+ chart = Ci::Charts::BuildTime.new(@pipeline.project)
expect(chart.build_times).to eq([2])
end
it 'should handle nil build times' do
- create(:ci_commit, duration: nil, project: @commit.project)
+ create(:ci_pipeline, duration: nil, project: @pipeline.project)
- chart = Ci::Charts::BuildTime.new(@commit.project)
+ chart = Ci::Charts::BuildTime.new(@pipeline.project)
expect(chart.build_times).to eq([2, 0])
end
end
diff --git a/spec/lib/gitlab/badge/build_spec.rb b/spec/lib/gitlab/badge/build_spec.rb
index e87bf41ea25..530c43bfc0d 100644
--- a/spec/lib/gitlab/badge/build_spec.rb
+++ b/spec/lib/gitlab/badge/build_spec.rb
@@ -42,9 +42,8 @@ describe Gitlab::Badge::Build do
end
context 'build exists' do
- let(:ci_commit) { create(:ci_commit, project: project, sha: sha, ref: branch) }
- let!(:build) { create(:ci_build, pipeline: ci_commit) }
-
+ let(:pipeline) { create(:ci_pipeline, project: project, sha: sha, ref: branch) }
+ let!(:build) { create(:ci_build, pipeline: pipeline) }
context 'build success' do
before { build.success! }