Don’t unfollow when archiving

It was slightly broken in two ways:
- it doesn’t make other instructeurs unfollow the dossier
- if the dossier is unarchived, instructeurs don’t refollow automatically.
This commit is contained in:
Nicolas Bouilleaud 2019-08-14 18:02:37 +02:00
parent 769621de46
commit a2131d0fcc
2 changed files with 0 additions and 2 deletions

View file

@ -78,7 +78,6 @@ module Instructeurs
def archive def archive
dossier.update(archived: true) dossier.update(archived: true)
current_instructeur.unfollow(dossier)
redirect_back(fallback_location: instructeur_procedures_url) redirect_back(fallback_location: instructeur_procedures_url)
end end

View file

@ -82,7 +82,6 @@ describe Instructeurs::DossiersController, type: :controller do
it { expect(dossier.archived).to be true } it { expect(dossier.archived).to be true }
it { expect(response).to redirect_to(instructeur_procedures_url) } it { expect(response).to redirect_to(instructeur_procedures_url) }
it { expect(instructeur.followed_dossiers).not_to include(dossier) }
end end
describe '#unarchive' do describe '#unarchive' do