Optimized n+1 queries in accounts Atom and HTML views
Added stack trace for SQL queries in development Removed badly thought out accounts/lookup API
This commit is contained in:
parent
a4cc966476
commit
85d89b472d
13 changed files with 44 additions and 68 deletions
|
@ -1,24 +0,0 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::Accounts::LookupController, type: :controller do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) }
|
||||
let(:token) { double acceptable?: true, resource_owner_id: user.id }
|
||||
|
||||
before do
|
||||
allow(controller).to receive(:doorkeeper_token) { token }
|
||||
end
|
||||
|
||||
describe 'GET #index' do
|
||||
before do
|
||||
Fabricate(:account, username: 'bob')
|
||||
Fabricate(:account, username: 'mcbeth')
|
||||
get :index, params: { usernames: 'alice,bob,mcbeth' }
|
||||
end
|
||||
|
||||
it 'returns http success' do
|
||||
expect(response).to have_http_status(:success)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue