cb890343ff
feat(user.merge): ensure to merge user.targeted_user_link Update app/models/targeted_user_link.rb Co-authored-by: LeSim <mail@simon.lehericey.net> Update app/models/targeted_user_link.rb Co-authored-by: LeSim <mail@simon.lehericey.net> Update app/models/targeted_user_link.rb Co-authored-by: LeSim <mail@simon.lehericey.net> feat(db/create_targeted_user_links): ensure not null with fk
13 lines
378 B
Ruby
13 lines
378 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe TargetedUserLink, type: :model do
|
|
describe 'Validation' do
|
|
let(:targeted_user_link) { build(:targeted_user_link) }
|
|
|
|
context 'target_context' do
|
|
it 'is bullet proof' do
|
|
expect { targeted_user_link.target_context = :kc }.to raise_error(ArgumentError, "'kc' is not a valid target_context")
|
|
end
|
|
end
|
|
end
|
|
end
|