Commit da36ac0f authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'sh-fix-mirror-spec-failure' into 'master'

Fix intermittent spec failure in spec/lib/gitlab/mirror_spec.rb

Closes #2081

See merge request !1570
parents d5b883e1 e323681a
......@@ -256,14 +256,14 @@ describe Gitlab::Mirror do
expect(Gitlab::Mirror.at_beginning_of_day?).to be true
end
it 'returns false if at beginning of hour' do
Timecop.freeze(DateTime.now.beginning_of_hour)
it 'returns true during the first 14 minutes of the day' do
Timecop.freeze(DateTime.now.beginning_of_day + 14.minutes)
expect(Gitlab::Mirror.at_beginning_of_day?).to be false
expect(Gitlab::Mirror.at_beginning_of_day?).to be true
end
it 'returns false in every 15 minute mark' do
Timecop.freeze(DateTime.now.beginning_of_hour + 15.minutes)
it 'returns false if some time after the day started' do
Timecop.freeze(DateTime.now.midday)
expect(Gitlab::Mirror.at_beginning_of_day?).to be false
end
......
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