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:
authorRémy Coutable <remy@rymai.me>2016-10-05 18:40:29 +0300
committerRémy Coutable <remy@rymai.me>2016-10-05 18:40:29 +0300
commit8ddb082fbcdfdfe9ce14922e88a38bf02504d7c3 (patch)
tree48bf9769b17cfcf682d1289af10aa754c85cc37f /spec/models
parentba4c392721bc5d784b5d71a5ea41ee83edebc923 (diff)
parent154253cab55491d54dfe264fa946acb9c399398a (diff)
Merge branch 'trending-caching' into 'master'
Refactor TrendingProjectsFinder to support caching ## What does this MR do? This refactors `TrendingProjectsFinder` so it can support caching of the data. See cb7d398972d786ba7133418266fa34ae641b2497 for more details. ## Why was this MR needed? Trending projects is quite slow, easily taking seconds to load the entire page. https://gitlab.com/gitlab-org/gitlab-ce/issues/22164 https://gitlab.com/gitlab-com/infrastructure/milestones/4, in particular the section "Trending page under 2s" See merge request !6672
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 3ab5ac78bba..e52d4aaf884 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -824,6 +824,14 @@ describe Project, models: true do
expect(subject).to eq([project2, project1])
end
end
+
+ it 'does not take system notes into account' do
+ 10.times do
+ create(:note_on_commit, project: project2, system: true)
+ end
+
+ expect(described_class.trending.to_a).to eq([project1, project2])
+ end
end
describe '.visible_to_user' do