about summary refs log tree commit diff
path: root/spec/controllers/admin/two_factor_authentications_controller_spec.rb
blob: 69f26039a066cc60c87ab3f1d5b3c41d4e9149c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'rails_helper'

describe Admin::TwoFactorAuthenticationsController do
  render_views

  let(:user) { Fabricate(:user) }
  before do
    sign_in Fabricate(:user, admin: true), scope: :user
  end

  describe 'DELETE #destroy' do
    it 'redirects to admin accounts page' do
      delete :destroy, params: { user_id: user.id }
      expect(response).to redirect_to(admin_accounts_path)
    end
  end
end