~cytrogen/masto-fe

ref: 1153531e923d27e7f83a54b6280b196195f0905e masto-fe/spec/controllers/api/v1/admin/trends/statuses_controller_spec.rb -rw-r--r-- 620 bytes
1153531e — dependabot[bot] Bump faker from 3.1.1 to 3.2.0 (#24579) 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'rails_helper'

describe Api::V1::Admin::Trends::StatusesController do
  render_views

  let(:user)    { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
  let(:token)   { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'admin:read') }
  let(:account) { Fabricate(:account) }

  before do
    allow(controller).to receive(:doorkeeper_token) { token }
  end

  describe 'GET #index' do
    it 'returns http success' do
      get :index, params: { account_id: account.id, limit: 2 }

      expect(response).to have_http_status(200)
    end
  end
end