From 4de06435d0c6fc904081b4da82253a2e025613a4 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Tue, 30 Apr 2019 13:36:44 +0100 Subject: Write test that exposes bug with Fugit gem --- spec/lib/gitlab/ci/cron_parser_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/lib/gitlab/ci/cron_parser_spec.rb b/spec/lib/gitlab/ci/cron_parser_spec.rb index 2a3f7807fdb..491e3fba9d9 100644 --- a/spec/lib/gitlab/ci/cron_parser_spec.rb +++ b/spec/lib/gitlab/ci/cron_parser_spec.rb @@ -174,6 +174,13 @@ describe Gitlab::Ci::CronParser do it { expect(subject).to be_nil } end + + context 'when cron is scheduled to a non existent day' do + let(:cron) { '0 12 31 2 *' } + let(:cron_timezone) { 'UTC' } + + it { expect(subject).to be_nil } + end end describe '#cron_valid?' do -- cgit v1.2.1