Revert "Revert "4127 fix superadmin supprime compte usager""
This reverts commit 751f24f7bb
.
This commit is contained in:
parent
a82cf22b71
commit
cee4c5b8fb
13 changed files with 150 additions and 22 deletions
17
spec/controllers/manager/instructeurs_controller_spec.rb
Normal file
17
spec/controllers/manager/instructeurs_controller_spec.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue