fix(instructeur): pending_correction flag does not make messagerie unseen

This commit is contained in:
Colin Darie 2023-04-04 10:32:36 +02:00
parent 62cc9d30d8
commit 8839ac7f76
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 3 additions and 1 deletions

View file

@ -13,7 +13,7 @@ module Instructeurs
before_action :redirect_on_dossier_in_batch_operation, only: [:archive, :unarchive, :follow, :unfollow, :passer_en_instruction, :repasser_en_construction, :repasser_en_instruction, :terminer, :restore, :destroy, :extend_conservation]
after_action :mark_demande_as_read, only: :show
after_action :mark_messagerie_as_read, only: [:messagerie, :create_commentaire]
after_action :mark_messagerie_as_read, only: [:messagerie, :create_commentaire, :pending_corrections]
after_action :mark_avis_as_read, only: [:avis, :create_avis]
after_action :mark_annotations_privees_as_read, only: [:annotations_privees, :update_annotations]

View file

@ -512,6 +512,8 @@ describe Instructeurs::DossiersController, type: :controller do
allow(DossierMailer).to receive(:notify_pending_correction)
.and_return(double(deliver_later: nil))
expect(controller.current_instructeur).to receive(:mark_tab_as_seen).with(dossier, :messagerie)
end
context "dossier en instruction" do