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:
authorTimothy Andrew <mail@timothyandrew.net>2016-09-26 07:33:57 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-09-26 16:08:40 +0300
commitc0ecef79fe936b9e71384f8d951fc5503f26f4a7 (patch)
treef1be52fe5ff1773036defe22f5f7d232cac3c40c /spec/models/cycle_analytics
parentf1bfb872877df7baf36d2de1ad5dfdb4c8604c9b (diff)
Fix the "Commits" section of the cycle analytics summary.
- The commit count was capped at 10, due to `Gitlab::Git::Repository#log` enforcing a limit, with the default set to 10. - Reimplement a small portion of this `log` function to get just the data we need.
Diffstat (limited to 'spec/models/cycle_analytics')
-rw-r--r--spec/models/cycle_analytics/summary_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/cycle_analytics/summary_spec.rb b/spec/models/cycle_analytics/summary_spec.rb
index 743bc2da33f..9d67bc82cba 100644
--- a/spec/models/cycle_analytics/summary_spec.rb
+++ b/spec/models/cycle_analytics/summary_spec.rb
@@ -34,6 +34,12 @@ describe CycleAnalytics::Summary, models: true do
expect(subject.commits).to eq(0)
end
+
+ it "finds a large (> 100) snumber of commits if present" do
+ Timecop.freeze(5.days.from_now) { create_commit("Test message", project, user, 'master', count: 100) }
+
+ expect(subject.commits).to eq(100)
+ end
end
describe "#deploys" do