Avoid sending notification emails about archived dossiers
This commit is contained in:
parent
a2131d0fcc
commit
f74fde3f80
2 changed files with 2 additions and 2 deletions
|
@ -176,7 +176,7 @@ class Instructeur < ApplicationRecord
|
|||
|
||||
h = {
|
||||
nb_en_construction: groupe.dossiers.en_construction.count,
|
||||
nb_notification: notifications_for_procedure(procedure, :all).count
|
||||
nb_notification: notifications_for_procedure(procedure, :not_archived).count
|
||||
}
|
||||
|
||||
if h[:nb_en_construction] > 0 || h[:nb_notification] > 0
|
||||
|
|
|
@ -389,7 +389,7 @@ describe Instructeur, type: :model do
|
|||
context 'when a notification exists' do
|
||||
before do
|
||||
allow(instructeur).to receive(:notifications_for_procedure)
|
||||
.with(procedure_to_assign, :all)
|
||||
.with(procedure_to_assign, :not_archived)
|
||||
.and_return([1, 2, 3])
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue