0
0
Fork 0

Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)

Also, fix some n+1 queries

Resolve #10365
This commit is contained in:
Eugen Rochko 2019-03-28 04:44:59 +01:00 committed by GitHub
parent f46f67d984
commit f1bc90ab50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 45 additions and 43 deletions

View file

@ -464,7 +464,7 @@ RSpec.describe ActivityPub::Activity::Create do
context 'when a vote to a local poll' do
let(:poll) { Fabricate(:poll, options: %w(Yellow Blue)) }
let!(:local_status) { Fabricate(:status, owned_poll: poll) }
let!(:local_status) { Fabricate(:status, poll: poll) }
let(:object_json) do
{
@ -489,7 +489,7 @@ RSpec.describe ActivityPub::Activity::Create do
poll.save(validate: false)
poll
end
let!(:local_status) { Fabricate(:status, owned_poll: poll) }
let!(:local_status) { Fabricate(:status, poll: poll) }
let(:object_json) do
{