delete a user
This commit is contained in:
parent
58ef36ff57
commit
9a62d3fe0c
6 changed files with 73 additions and 6 deletions
17
spec/controllers/manager/users_controller_spec.rb
Normal file
17
spec/controllers/manager/users_controller_spec.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue