test(siret): fix after champ factory have been changed to real values

This commit is contained in:
Colin Darie 2024-12-04 12:07:12 +01:00
parent 90a8888ade
commit b71d60dff9
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 10 additions and 3 deletions

View file

@ -10,6 +10,10 @@ module Maintenance
let(:element) { dossier.champs.first }
subject(:process) { described_class.process(element) }
before do
element.update!(value_json: nil)
end
it 'updates value_json' do
expect { subject }.to change { element.reload.value_json }
.from(anything)

View file

@ -9,9 +9,12 @@ describe 'shared/dossiers/normalized_address', type: :view do
let(:address) { AddressProxy.new(dossier.champs.first) }
it 'render address' do
AddressProxy::ADDRESS_PARTS.each do |address_part|
expect(subject).to have_text(address_part)
end
expect(subject).to have_text("6 RUE RAOUL NORDLING")
expect(subject).to have_text("Bois-Colombes")
expect(subject).to have_text("92270")
expect(subject).to have_text("92009")
expect(subject).to have_text("Hauts-de-Seine 92")
expect(subject).to have_text("Île-de-France 11")
end
end