2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-05-23 15:09:22 +02:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe TargetedUserLink, type: :model do
|
|
|
|
describe 'Validation' do
|
|
|
|
let(:targeted_user_link) { build(:targeted_user_link) }
|
|
|
|
|
2022-06-13 16:00:41 +02:00
|
|
|
describe 'target_context' do
|
2022-05-23 15:09:22 +02:00
|
|
|
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
|