2018-01-26 16:07:35 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2018-02-02 21:51:03 +00:00
|
|
|
describe UserCallout do
|
|
|
|
let!(:callout) { create(:user_callout) }
|
2018-01-26 16:07:35 +00:00
|
|
|
|
|
|
|
describe 'relationships' do
|
|
|
|
it { is_expected.to belong_to(:user) }
|
|
|
|
end
|
2018-02-02 02:07:33 +00:00
|
|
|
|
|
|
|
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) }
|
|
|
|
end
|
2018-01-26 16:07:35 +00:00
|
|
|
end
|