Disable Messagerie in archived Dossiers and procedures

* Use the existing Dossier#messagerie_available? method
* Raise when attempting to build a Commentaire if not messagerie_available?
* Disable the Messagerie form if not messagerie_available?
* Add tests :)
* Tweak the Horaires formatting while we’re here.
This commit is contained in:
Nicolas Bouilleaud 2019-06-20 09:58:53 +02:00
parent 8febe8c21f
commit bd47bf2691
8 changed files with 58 additions and 5 deletions

View file

@ -2,7 +2,7 @@ require 'spec_helper'
describe CommentaireService do
describe '.create' do
let(:dossier) { create :dossier }
let(:dossier) { create :dossier, :en_construction }
let(:sender) { dossier.user }
let(:body) { 'Contenu du message.' }
let(:file) { nil }