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

export_batch_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: 43209921b9c257906f1f53a94ffd7818fe4e15d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe BulkImports::ExportBatch, type: :model, feature_category: :importers do
  describe 'associations' do
    it { is_expected.to belong_to(:export) }
    it { is_expected.to have_one(:upload) }
  end

  describe 'validations' do
    subject { build(:bulk_import_export_batch) }

    it { is_expected.to validate_presence_of(:batch_number) }
    it { is_expected.to validate_uniqueness_of(:batch_number).scoped_to(:export_id) }
  end
end