diff options
Diffstat (limited to 'spec/models/bulk_import_spec.rb')
-rw-r--r-- | spec/models/bulk_import_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/bulk_import_spec.rb b/spec/models/bulk_import_spec.rb new file mode 100644 index 00000000000..1a7e1ed8119 --- /dev/null +++ b/spec/models/bulk_import_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe BulkImport, type: :model do + describe 'associations' do + it { is_expected.to belong_to(:user).required } + it { is_expected.to have_one(:configuration) } + it { is_expected.to have_many(:entities) } + end + + describe 'validations' do + it { is_expected.to validate_presence_of(:source_type) } + it { is_expected.to validate_presence_of(:status) } + + it { is_expected.to define_enum_for(:source_type).with_values(%i[gitlab]) } + end +end |