0
0
Fork 0

Add password reset for users from admin accounts area (#1841)

This commit is contained in:
Matt Jankowski 2017-04-15 10:44:59 -04:00 committed by Eugen
parent 9d2f55ecc3
commit 6670e6d33f
4 changed files with 47 additions and 8 deletions

View file

@ -0,0 +1,16 @@
require 'rails_helper'
describe Admin::ResetsController do
let(:account) { Fabricate(:account, user: Fabricate(:user)) }
before do
sign_in Fabricate(:user, admin: true), scope: :user
end
describe 'POST #create' do
it 'redirects to admin accounts page' do
post :create, params: { account_id: account.id }
expect(response).to redirect_to(admin_accounts_path)
end
end
end