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:
authorAndreas Brandl <abrandl@gitlab.com>2019-03-07 20:21:34 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-03-07 20:21:34 +0300
commita1a8202f081f75431dee14e246cd55acaddba2aa (patch)
tree7e314479ddb0e5d2210f1e08a1be2acc8940c9ce /spec/models
parent5211386293cdd95fd6161019716301f806749137 (diff)
parent8b9b37f6c86bfc049f0b4fc785ae01d94545ab48 (diff)
Merge branch 'use-date-for-upcoming-milestone-comparison' into 'master'
Use date for upcoming milestone comparison Closes #58325 See merge request gitlab-org/gitlab-ce!25806
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/milestone_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb
index 77b7042424c..717d4ae4ec0 100644
--- a/spec/models/milestone_spec.rb
+++ b/spec/models/milestone_spec.rb
@@ -379,6 +379,21 @@ describe Milestone do
expect(milestone_ids).to be_empty
end
end
+
+ context 'when there is a milestone with a date after 294276 AD', :postgresql do
+ before do
+ past_milestone_project_1.update!(due_date: Date.new(294277, 1, 1))
+ end
+
+ it 'returns the next upcoming open milestone ID for each project and group' do
+ expect(milestone_ids).to contain_exactly(
+ current_milestone_project_1.id,
+ current_milestone_project_2.id,
+ current_milestone_group_1.id,
+ current_milestone_group_2.id
+ )
+ end
+ end
end
describe '#to_reference' do