instances_controller_spec.rb 453 B

12345678910111213141516171819202122
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe Api::V2::InstancesController do
  4. render_views
  5. let(:user) { Fabricate(:user) }
  6. let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) }
  7. before do
  8. allow(controller).to receive(:doorkeeper_token) { token }
  9. end
  10. describe 'GET #show' do
  11. it 'returns http success' do
  12. get :show
  13. expect(response).to have_http_status(200)
  14. end
  15. end
  16. end