diff options
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics/plan_event_fetcher_spec.rb')
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/plan_event_fetcher_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/plan_event_fetcher_spec.rb b/spec/lib/gitlab/cycle_analytics/plan_event_fetcher_spec.rb new file mode 100644 index 00000000000..2e5dc5b5547 --- /dev/null +++ b/spec/lib/gitlab/cycle_analytics/plan_event_fetcher_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' +require 'lib/gitlab/cycle_analytics/shared_event_spec' + +describe Gitlab::CycleAnalytics::PlanEventFetcher do + let(:stage_name) { :plan } + + it_behaves_like 'default query config' do + context 'no commits' do + it 'does not blow up if there are no commits' do + allow(event).to receive(:event_result).and_return([{}]) + + expect { event.fetch }.not_to raise_error + end + end + end +end |