Commit aebb5da1 authored by Kyle Wiebers's avatar Kyle Wiebers

Move the iteration #timebox_date_range spec to ee

Relates to https://gitlab.com/gitlab-org/gitlab-foss/-/issues/79666
parent 5215d4d8
...@@ -23,6 +23,23 @@ RSpec.describe TimeboxesHelper do ...@@ -23,6 +23,23 @@ RSpec.describe TimeboxesHelper do
end end
end end
describe '#timebox_date_range' do
let(:yesterday) { Date.yesterday }
let(:tomorrow) { yesterday + 2 }
let(:format) { '%b %-d, %Y' }
let(:yesterday_formatted) { yesterday.strftime(format) }
let(:tomorrow_formatted) { tomorrow.strftime(format) }
context 'iteration' do
# Iterations always have start and due dates, so only A-B format is expected
it 'formats properly' do
iteration = build(:iteration, start_date: yesterday, due_date: tomorrow)
expect(timebox_date_range(iteration)).to eq("#{yesterday_formatted}#{tomorrow_formatted}")
end
end
end
describe '#show_burndown_placeholder?' do describe '#show_burndown_placeholder?' do
let_it_be(:user) { build(:user) } let_it_be(:user) { build(:user) }
......
...@@ -58,15 +58,6 @@ RSpec.describe TimeboxesHelper do ...@@ -58,15 +58,6 @@ RSpec.describe TimeboxesHelper do
it { expect(result_for(start_date: yesterday)).to eq("started on #{yesterday_formatted}") } it { expect(result_for(start_date: yesterday)).to eq("started on #{yesterday_formatted}") }
it { expect(result_for(start_date: yesterday, due_date: tomorrow)).to eq("#{yesterday_formatted}#{tomorrow_formatted}") } it { expect(result_for(start_date: yesterday, due_date: tomorrow)).to eq("#{yesterday_formatted}#{tomorrow_formatted}") }
end end
context 'iteration' do
# Iterations always have start and due dates, so only A-B format is expected
it 'formats properly' do
iteration = build(:iteration, start_date: yesterday, due_date: tomorrow)
expect(timebox_date_range(iteration)).to eq("#{yesterday_formatted}#{tomorrow_formatted}")
end
end
end end
describe '#milestone_counts' do describe '#milestone_counts' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment