test: fix for mutable string

This commit is contained in:
Colin Darie 2024-05-13 16:38:37 +02:00
parent 6d9a7648e2
commit 659d35e11f
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
6 changed files with 8 additions and 4 deletions

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
describe Siret, type: :model do
subject { Siret.new(siret: siret) }
subject { Siret.new(siret: siret.dup) } # .dup in order to simulate a non literal user string
context 'with no siret provided' do
let(:siret) { '' }