Merge pull request #757 from sgmap/confidentiel_avis_by_default_legacy_ui
BackofficeAvisController: make new avis confidentiel by default
This commit is contained in:
commit
3a77822241
2 changed files with 2 additions and 1 deletions
|
@ -4,7 +4,7 @@ class Backoffice::AvisController < ApplicationController
|
|||
before_action :check_avis_exists_and_email_belongs_to_avis, only: [:sign_up, :create_gestionnaire]
|
||||
|
||||
def create
|
||||
avis = Avis.new(create_params.merge(claimant: current_gestionnaire, dossier: dossier))
|
||||
avis = Avis.new(create_params.merge(claimant: current_gestionnaire, dossier: dossier, confidentiel: true))
|
||||
|
||||
if avis.save
|
||||
flash[:notice] = "Votre demande d'avis a bien été envoyée à #{avis.email_to_display}"
|
||||
|
|
|
@ -34,6 +34,7 @@ describe Backoffice::AvisController, type: :controller do
|
|||
it { expect(created_avis.dossier_id).to eq(dossier.id) }
|
||||
it { expect(created_avis.gestionnaire).to eq(gestionnaire) }
|
||||
it { expect(created_avis.claimant).to eq(claimant) }
|
||||
it { expect(created_avis.confidentiel).to be(true) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue