summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/cycle_analytics
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-01 15:06:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-01 15:06:21 +0000
commitded8ee5a09a1a02209adf179ac7d6e456703726a (patch)
treec56a789ac38644cb2982f3c2a8277f1e540f5913 /spec/lib/gitlab/cycle_analytics
parentdeed6022efe0149d88c57ef1df736c83465643f9 (diff)
downloadgitlab-ce-ded8ee5a09a1a02209adf179ac7d6e456703726a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics')
-rw-r--r--spec/lib/gitlab/cycle_analytics/group_stage_summary_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/group_stage_summary_spec.rb b/spec/lib/gitlab/cycle_analytics/group_stage_summary_spec.rb
index d5c2f7cc579..664009f140f 100644
--- a/spec/lib/gitlab/cycle_analytics/group_stage_summary_spec.rb
+++ b/spec/lib/gitlab/cycle_analytics/group_stage_summary_spec.rb
@@ -44,6 +44,14 @@ describe Gitlab::CycleAnalytics::GroupStageSummary do
expect(subject.first[:value]).to eq(2)
end
end
+
+ context 'when `from` and `to` parameters are provided' do
+ subject { described_class.new(group, options: { from: 10.days.ago, to: Time.now, current_user: user }).data }
+
+ it 'finds issues from 5 days ago' do
+ expect(subject.first[:value]).to eq(2)
+ end
+ end
end
context 'with other projects' do
@@ -97,6 +105,14 @@ describe Gitlab::CycleAnalytics::GroupStageSummary do
expect(subject.second[:value]).to eq(2)
end
end
+
+ context 'when `from` and `to` parameters are provided' do
+ subject { described_class.new(group, options: { from: 10.days.ago, to: Time.now, current_user: user }).data }
+
+ it 'finds deployments from 5 days ago' do
+ expect(subject.second[:value]).to eq(2)
+ end
+ end
end
context 'with other projects' do