You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
612 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe Api::V1::Admin::IpBlocksController do
  4. render_views
  5. let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
  6. let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'admin:read') }
  7. let(:account) { Fabricate(:account) }
  8. before do
  9. allow(controller).to receive(:doorkeeper_token) { token }
  10. end
  11. describe 'GET #index' do
  12. it 'returns http success' do
  13. get :index, params: { account_id: account.id, limit: 2 }
  14. expect(response).to have_http_status(200)
  15. end
  16. end
  17. end