diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/models/iteration_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/models/iteration_spec.rb')
-rw-r--r-- | spec/models/iteration_spec.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/models/iteration_spec.rb b/spec/models/iteration_spec.rb index e5b7b746639..ae14adf9106 100644 --- a/spec/models/iteration_spec.rb +++ b/spec/models/iteration_spec.rb @@ -6,10 +6,6 @@ describe Iteration do let_it_be(:project) { create(:project) } let_it_be(:group) { create(:group) } - it_behaves_like 'a timebox', :iteration do - let(:timebox_table_name) { described_class.table_name.to_sym } - end - describe "#iid" do it "is properly scoped on project and group" do iteration1 = create(:iteration, project: project) @@ -62,7 +58,7 @@ describe Iteration do end context 'when end_date is in range' do - let(:start_date) { Time.now } + let(:start_date) { Time.current } let(:due_date) { 6.days.from_now } it 'is not valid' do @@ -94,7 +90,7 @@ describe Iteration do describe '#future_date' do context 'when dates are in the future' do - let(:start_date) { Time.now } + let(:start_date) { Time.current } let(:due_date) { 1.week.from_now } it { is_expected.to be_valid } @@ -111,7 +107,7 @@ describe Iteration do end context 'when due_date is in the past' do - let(:start_date) { Time.now } + let(:start_date) { Time.current } let(:due_date) { 1.week.ago } it 'is not valid' do @@ -122,7 +118,7 @@ describe Iteration do context 'when start_date is over 500 years in the future' do let(:start_date) { 501.years.from_now } - let(:due_date) { Time.now } + let(:due_date) { Time.current } it 'is not valid' do expect(subject).not_to be_valid @@ -131,7 +127,7 @@ describe Iteration do end context 'when due_date is over 500 years in the future' do - let(:start_date) { Time.now } + let(:start_date) { Time.current } let(:due_date) { 501.years.from_now } it 'is not valid' do @@ -143,7 +139,7 @@ describe Iteration do end describe '.within_timeframe' do - let_it_be(:now) { Time.now } + let_it_be(:now) { Time.current } let_it_be(:project) { create(:project, :empty_repo) } let_it_be(:iteration_1) { create(:iteration, project: project, start_date: now, due_date: 1.day.from_now) } let_it_be(:iteration_2) { create(:iteration, project: project, start_date: 2.days.from_now, due_date: 3.days.from_now) } |