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

17 lines
505 B
Ruby

# 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