debian-mirror-gitlab/spec/models/bulk_import_spec.rb
2021-01-30 21:13:32 +05:30

18 lines
519 B
Ruby

# 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