debian-mirror-gitlab/spec/models/bulk_imports/configuration_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
505 B
Ruby
Raw Permalink Normal View History

2021-01-03 14:25:43 +05:30
# 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