0
0
Fork 0

Autofix Rubocops RSpec/ScatteredLet (#23725)

This commit is contained in:
Nick Schonning 2023-02-19 21:17:41 -05:00 committed by GitHub
parent aef0051fd0
commit 5179c47087
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 56 additions and 83 deletions

View file

@ -6,20 +6,6 @@ end
RSpec.describe ActivityPub::ProcessStatusUpdateService, type: :service do
let!(:status) { Fabricate(:status, text: 'Hello world', account: Fabricate(:account, domain: 'example.com')) }
let(:alice) { Fabricate(:account) }
let(:bob) { Fabricate(:account) }
let(:mentions) { [] }
let(:tags) { [] }
let(:media_attachments) { [] }
before do
mentions.each { |a| Fabricate(:mention, status: status, account: a) }
tags.each { |t| status.tags << t }
media_attachments.each { |m| status.media_attachments << m }
end
let(:payload) do
{
'@context': 'https://www.w3.org/ns/activitystreams',
@ -34,9 +20,21 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService, type: :service do
],
}
end
let(:json) { Oj.load(Oj.dump(payload)) }
let(:alice) { Fabricate(:account) }
let(:bob) { Fabricate(:account) }
let(:mentions) { [] }
let(:tags) { [] }
let(:media_attachments) { [] }
before do
mentions.each { |a| Fabricate(:mention, status: status, account: a) }
tags.each { |t| status.tags << t }
media_attachments.each { |m| status.media_attachments << m }
end
subject { described_class.new }
describe '#call' do