Revert "Revert "4127 fix superadmin supprime compte usager""

This reverts commit 751f24f7bb.
This commit is contained in:
Christophe Robillard 2020-01-30 10:48:28 +01:00
parent a82cf22b71
commit cee4c5b8fb
13 changed files with 150 additions and 22 deletions

View file

@ -0,0 +1,17 @@
describe Manager::InstructeursController, type: :controller do
let(:administration) { create(:administration) }
describe '#delete' do
let!(:instructeur) { create(:instructeur) }
before { sign_in administration }
subject { delete :delete, params: { id: instructeur.id } }
it 'deletes the instructeur' do
subject
expect(Instructeur.find_by(id: instructeur.id)).to be_nil
end
end
end