gitlab-org--gitlab-foss/spec/models/user_callout_spec.rb

21 lines
514 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
2018-01-26 16:07:35 +00:00
2018-02-02 21:51:03 +00:00
describe UserCallout do
2018-12-03 12:43:34 +00:00
let!(:callout) { create(:user_callout) }
2018-12-04 10:24:21 +00:00
it_behaves_like 'having unique enum values'
2018-01-26 16:07:35 +00:00
describe 'relationships' do
it { is_expected.to belong_to(:user) }
end
describe 'validations' do
it { is_expected.to validate_presence_of(:user) }
it { is_expected.to validate_presence_of(:feature_name) }
it { is_expected.to validate_uniqueness_of(:feature_name).scoped_to(:user_id).ignoring_case_sensitivity }
end
2018-01-26 16:07:35 +00:00
end