Welcome to mirror list, hosted at ThFree Co, Russian Federation.

batch_tracker_spec.rb « bulk_imports « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 336943228c742fd1079294ab5130327dcae64304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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