Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-04-26 15:04:22 +0300
committerRémy Coutable <remy@rymai.me>2017-04-26 15:04:22 +0300
commit019b06b9d29162356a89be46f958a8c0cbd022fd (patch)
tree59470748a7ccde2aceec632b9af8c4500ac973fd /spec/helpers/ci_status_helper_spec.rb
parent93a698f9b25baa1d3a66326f3f9761103c5ffb87 (diff)
Load a project's CI status in batch from redis
Diffstat (limited to 'spec/helpers/ci_status_helper_spec.rb')
-rw-r--r--spec/helpers/ci_status_helper_spec.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/helpers/ci_status_helper_spec.rb b/spec/helpers/ci_status_helper_spec.rb
index 3dc13001056..e6bb953e9d8 100644
--- a/spec/helpers/ci_status_helper_spec.rb
+++ b/spec/helpers/ci_status_helper_spec.rb
@@ -46,14 +46,15 @@ describe CiStatusHelper do
end
describe "#pipeline_status_cache_key" do
- let(:pipeline_status) do
- Gitlab::Cache::Ci::ProjectPipelineStatus
- .new(build(:project), sha: '123abc', status: 'success')
- end
-
it "builds a cache key for pipeline status" do
- expect(helper.pipeline_status_cache_key(pipeline_status))
- .to eq("pipeline-status/123abc-success")
+ pipeline_status = Gitlab::Cache::Ci::ProjectPipelineStatus.new(
+ build(:project),
+ pipeline_info: {
+ sha: "123abc",
+ status: "success"
+ }
+ )
+ expect(helper.pipeline_status_cache_key(pipeline_status)).to eq("pipeline-status/123abc-success")
end
end
end