The code powering m.abunchtell.com https://m.abunchtell.com
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

23 řádky
570 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe Api::V1::SearchController, type: :controller do
  4. render_views
  5. let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) }
  6. let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') }
  7. before do
  8. allow(controller).to receive(:doorkeeper_token) { token }
  9. end
  10. describe 'GET #index' do
  11. it 'returns http success' do
  12. get :index, params: { q: 'test' }
  13. expect(response).to have_http_status(:success)
  14. end
  15. end
  16. end