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:
parent
769621de46
commit
a2131d0fcc
2 changed files with 0 additions and 2 deletions
|
@ -78,7 +78,6 @@ module Instructeurs
|
|||
|
||||
def archive
|
||||
dossier.update(archived: true)
|
||||
current_instructeur.unfollow(dossier)
|
||||
redirect_back(fallback_location: instructeur_procedures_url)
|
||||
end
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ describe Instructeurs::DossiersController, type: :controller do
|
|||
|
||||
it { expect(dossier.archived).to be true }
|
||||
it { expect(response).to redirect_to(instructeur_procedures_url) }
|
||||
it { expect(instructeur.followed_dossiers).not_to include(dossier) }
|
||||
end
|
||||
|
||||
describe '#unarchive' do
|
||||
|
|
Loading…
Reference in a new issue