demarches-normaliennes/spec/controllers/manager/users_controller_spec.rb
Christophe Robillard 9a62d3fe0c delete a user
2020-01-13 10:06:43 +01:00

17 lines
375 B
Ruby

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