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/projects_helper_spec.rb
parent93a698f9b25baa1d3a66326f3f9761103c5ffb87 (diff)
Load a project's CI status in batch from redis
Diffstat (limited to 'spec/helpers/projects_helper_spec.rb')
-rw-r--r--spec/helpers/projects_helper_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index a7fc5d14859..d96d48a1977 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -103,6 +103,18 @@ describe ProjectsHelper do
end
end
+ describe '#load_pipeline_status' do
+ it 'loads the pipeline status in batch' do
+ project = build(:empty_project)
+
+ helper.load_pipeline_status([project])
+ # Skip lazy loading of the `pipeline_status` attribute
+ pipeline_status = project.instance_variable_get('@pipeline_status')
+
+ expect(pipeline_status).to be_a(Gitlab::Cache::Ci::ProjectPipelineStatus)
+ end
+ end
+
describe 'link_to_member' do
let(:group) { create(:group) }
let(:project) { create(:empty_project, group: group) }