demarches-normaliennes/spec/models/targeted_user_link_spec.rb
2024-08-22 09:26:48 +02:00

15 lines
410 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe TargetedUserLink, type: :model do
describe 'Validation' do
let(:targeted_user_link) { build(:targeted_user_link) }
describe '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