diff options
Diffstat (limited to 'spec/events/projects/project_created_event_spec.rb')
-rw-r--r-- | spec/events/projects/project_created_event_spec.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/spec/events/projects/project_created_event_spec.rb b/spec/events/projects/project_created_event_spec.rb deleted file mode 100644 index d70c737afb0..00000000000 --- a/spec/events/projects/project_created_event_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Projects::ProjectCreatedEvent do - where(:data, :valid) do - [ - [{ project_id: 1, namespace_id: 2, root_namespace_id: 3 }, true], - [{ project_id: 1 }, false], - [{ namespace_id: 1 }, false], - [{ project_id: 'foo', namespace_id: 2 }, false], - [{ project_id: 1, namespace_id: 'foo' }, false], - [{ project_id: [], namespace_id: 2 }, false], - [{ project_id: 1, namespace_id: [] }, false], - [{ project_id: {}, namespace_id: 2 }, false], - [{ project_id: 1, namespace_id: {} }, false], - ['foo', false], - [123, false], - [[], false] - ] - end - - with_them do - it 'validates data' do - constructor = -> { described_class.new(data: data) } - - if valid - expect { constructor.call }.not_to raise_error - else - expect { constructor.call }.to raise_error(Gitlab::EventStore::InvalidEvent) - end - end - end -end |