delete a user

This commit is contained in:
Christophe Robillard 2020-01-08 10:50:16 +01:00 committed by clemkeirua
parent 58ef36ff57
commit 9a62d3fe0c
6 changed files with 73 additions and 6 deletions

View file

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