display only etablissement infos
all the other infos are not yet available because the jobs which retrieve it are performed later
This commit is contained in:
parent
3b46594e60
commit
f40123fee1
4 changed files with 13 additions and 70 deletions
|
@ -6,27 +6,16 @@ describe 'users/dossiers/etablissement.html.haml', type: :view do
|
|||
before do
|
||||
sign_in dossier.user
|
||||
assign(:dossier, dossier)
|
||||
allow_any_instance_of(ApiEntrepriseToken).to receive(:roles).and_return([])
|
||||
allow_any_instance_of(ApiEntrepriseToken).to receive(:expired?).and_return(false)
|
||||
end
|
||||
|
||||
subject! { render }
|
||||
|
||||
it 'affiche les informations de l’établissement' do
|
||||
expect(rendered).to have_text(etablissement.entreprise_raison_sociale)
|
||||
expect(rendered).to have_text(etablissement.siret)
|
||||
end
|
||||
|
||||
it 'n’affiche pas publiquement les derniers exercices comptables' do
|
||||
expect(rendered).not_to have_text(number_to_currency(etablissement.exercices.first.ca))
|
||||
end
|
||||
|
||||
context 'quand l’établissement est une association' do
|
||||
let(:etablissement) { create(:etablissement, :is_association) }
|
||||
|
||||
it 'affiche les informations de l’association' do
|
||||
expect(rendered).to have_text(etablissement.association_titre)
|
||||
end
|
||||
end
|
||||
|
||||
context 'etablissement avec infos non diffusables' do
|
||||
let(:etablissement) { create(:etablissement, :with_exercices, :non_diffusable) }
|
||||
it "affiche uniquement le nom de l'établissement si infos non diffusables" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue