From ded8ee5a09a1a02209adf179ac7d6e456703726a Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 1 Nov 2019 15:06:21 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../gitlab/cycle_analytics/group_stage_summary_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'spec/lib/gitlab/cycle_analytics') 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 -- cgit v1.2.1