affiche infos entreprise uniquement si diffusable

le champ de type siret affiche les infos d'une entreprise dont les infos sont diffusables uniquement aux instructeurs
This commit is contained in:
Christophe Robillard 2020-03-11 16:45:33 +01:00 committed by GitHub Action
parent c21dd3b830
commit 8e7f210216
2 changed files with 76 additions and 63 deletions

View file

@ -12,4 +12,13 @@ describe 'shared/dossiers/identite_entreprise.html.haml', type: :view do
end
end
end
context "for an entreprise with private infos" do
let(:etablissement) { create(:etablissement, :non_diffusable) }
it "displays only public infos" do
expect(rendered).to have_text(etablissement.entreprise_raison_sociale)
expect(rendered).not_to have_text(etablissement.entreprise.forme_juridique)
end
end
end