summaryrefslogtreecommitdiff
path: root/spec/models/bulk_imports/configuration_spec.rb
blob: 1cbfef631ac3c747be64aa44d82471710706d168 (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::Configuration, type: :model do
  describe 'associations' do
    it { is_expected.to belong_to(:bulk_import).required }
  end

  describe 'validations' do
    it { is_expected.to validate_length_of(:url).is_at_most(255) }
    it { is_expected.to validate_length_of(:access_token).is_at_most(255) }

    it { is_expected.to validate_presence_of(:url) }
    it { is_expected.to validate_presence_of(:access_token) }
  end
end