Autofix Rubocop RSpec/LeadingSubject (#23670)
This commit is contained in:
parent
4ea1e0fceb
commit
4552685f6b
78 changed files with 256 additions and 338 deletions
|
@ -1,6 +1,8 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::Activity::Announce do
|
||||
subject { described_class.new(json, sender) }
|
||||
|
||||
let(:sender) { Fabricate(:account, followers_url: 'http://example.com/followers', uri: 'https://example.com/actor') }
|
||||
let(:recipient) { Fabricate(:account) }
|
||||
let(:status) { Fabricate(:status, account: recipient) }
|
||||
|
@ -27,8 +29,6 @@ RSpec.describe ActivityPub::Activity::Announce do
|
|||
}
|
||||
end
|
||||
|
||||
subject { described_class.new(json, sender) }
|
||||
|
||||
describe '#perform' do
|
||||
context 'when sender is followed by a local account' do
|
||||
before do
|
||||
|
@ -110,13 +110,13 @@ RSpec.describe ActivityPub::Activity::Announce do
|
|||
end
|
||||
|
||||
context 'when the sender is relayed' do
|
||||
subject { described_class.new(json, sender, relayed_through_actor: relay_account) }
|
||||
|
||||
let!(:relay_account) { Fabricate(:account, inbox_url: 'https://relay.example.com/inbox') }
|
||||
let!(:relay) { Fabricate(:relay, inbox_url: 'https://relay.example.com/inbox') }
|
||||
|
||||
let(:object_json) { 'https://example.com/actor/hello-world' }
|
||||
|
||||
subject { described_class.new(json, sender, relayed_through_actor: relay_account) }
|
||||
|
||||
before do
|
||||
stub_request(:get, 'https://example.com/actor/hello-world').to_return(body: Oj.dump(unknown_object_json))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue