debian-mirror-gitlab/spec/models/user_callout_spec.rb
2018-03-17 18:26:18 +05:30

16 lines
437 B
Ruby

require 'rails_helper'
describe UserCallout do
let!(:callout) { create(:user_callout) }
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
end