supprime un instructeur
This commit is contained in:
parent
d4de5769ee
commit
a6d007dbd3
6 changed files with 74 additions and 4 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