This commit is contained in:
Kara Diaby 2023-03-23 17:14:54 +01:00
parent 7cdaf68cd8
commit 4a13c64b38

View file

@ -987,6 +987,23 @@ describe Administrateurs::ProceduresController, type: :controller do
end
end
describe 'PUT #allow_expert_messaging' do
let!(:procedure) { create :procedure, :with_service, administrateur: admin }
context 'when admin refuse to let experts discuss with users on this procedure' do
before do
procedure.update!(allow_expert_messaging: false)
procedure.reload
end
it { expect(procedure.allow_expert_messaging).to be_falsy }
end
context 'when admin accept to let experts discuss with users (true by default)' do
it { expect(procedure.allow_expert_messaging).to be_truthy }
end
end
describe 'PUT #restore' do
let(:procedure) { create :procedure_with_dossiers, :with_service, :published, administrateur: admin }