dossier: make messagerie available on archived procedures (#4091)
Instructeur : ré-active la messagerie sur les démarches archivées
This commit is contained in:
commit
420f7362fc
2 changed files with 7 additions and 13 deletions
|
@ -225,7 +225,7 @@ class Dossier < ApplicationRecord
|
|||
end
|
||||
|
||||
def messagerie_available?
|
||||
!brouillon? && !archived && !procedure.archivee?
|
||||
!brouillon? && !archived
|
||||
end
|
||||
|
||||
def retention_end_date
|
||||
|
|
|
@ -747,23 +747,17 @@ describe Dossier do
|
|||
it { is_expected.to be false }
|
||||
end
|
||||
|
||||
context "dossier is submitted" do
|
||||
before { dossier.state = Dossier.states.fetch(:en_instruction) }
|
||||
|
||||
it { is_expected.to be true }
|
||||
end
|
||||
|
||||
context "dossier is archived" do
|
||||
before { dossier.archived = true }
|
||||
|
||||
it { is_expected.to be false }
|
||||
end
|
||||
|
||||
context "procedure is archived" do
|
||||
before { procedure.archived_at = Date.today }
|
||||
|
||||
it { is_expected.to be false }
|
||||
end
|
||||
|
||||
context "procedure is not archived, dossier is not archived" do
|
||||
before { dossier.state = Dossier.states.fetch(:en_instruction) }
|
||||
|
||||
it { is_expected.to be true }
|
||||
end
|
||||
end
|
||||
|
||||
context "retention date" do
|
||||
|
|
Loading…
Reference in a new issue