debian-mirror-gitlab/spec/models/bulk_imports/batch_tracker_spec.rb
2023-05-27 22:25:52 +05:30

16 lines
462 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe BulkImports::BatchTracker, type: :model, feature_category: :importers do
describe 'associations' do
it { is_expected.to belong_to(:tracker) }
end
describe 'validations' do
subject { build(:bulk_import_batch_tracker) }
it { is_expected.to validate_presence_of(:batch_number) }
it { is_expected.to validate_uniqueness_of(:batch_number).scoped_to(:tracker_id) }
end
end