Commit d6b39535 authored by Mark Chao's avatar Mark Chao

Merge branch '79666-move-iteration-timebox-helper-spec' into 'master'

Move iteration #timebox_date_range spec to ee RUN AS-IF-FOSS

See merge request gitlab-org/gitlab!55248
parents 54afa534 aebb5da1
...@@ -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