demarches-normaliennes/spec/controllers/manager/users_controller_spec.rb

18 lines
375 B
Ruby
Raw Normal View History

2020-01-08 10:50:16 +01:00
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