Fix RSpec/ContextWording cop (#24739)

This commit is contained in:
Matt Jankowski
2023-05-03 23:49:08 -04:00
committed by GitHub
parent cf18cc2891
commit 710745e16b
105 changed files with 559 additions and 668 deletions

View File

@@ -27,7 +27,7 @@ RSpec.describe ActivityPub::Activity::Reject do
describe '#perform' do
subject { described_class.new(json, sender) }
context 'rejecting a pending follow request by target' do
context 'when rejecting a pending follow request by target' do
before do
Fabricate(:follow_request, account: recipient, target_account: sender)
subject.perform
@@ -42,7 +42,7 @@ RSpec.describe ActivityPub::Activity::Reject do
end
end
context 'rejecting a pending follow request by uri' do
context 'when rejecting a pending follow request by uri' do
before do
Fabricate(:follow_request, account: recipient, target_account: sender, uri: 'bar')
subject.perform
@@ -57,7 +57,7 @@ RSpec.describe ActivityPub::Activity::Reject do
end
end
context 'rejecting a pending follow request by uri only' do
context 'when rejecting a pending follow request by uri only' do
let(:object_json) { 'bar' }
before do
@@ -74,7 +74,7 @@ RSpec.describe ActivityPub::Activity::Reject do
end
end
context 'rejecting an existing follow relationship by target' do
context 'when rejecting an existing follow relationship by target' do
before do
Fabricate(:follow, account: recipient, target_account: sender)
subject.perform
@@ -89,7 +89,7 @@ RSpec.describe ActivityPub::Activity::Reject do
end
end
context 'rejecting an existing follow relationship by uri' do
context 'when rejecting an existing follow relationship by uri' do
before do
Fabricate(:follow, account: recipient, target_account: sender, uri: 'bar')
subject.perform
@@ -104,7 +104,7 @@ RSpec.describe ActivityPub::Activity::Reject do
end
end
context 'rejecting an existing follow relationship by uri only' do
context 'when rejecting an existing follow relationship by uri only' do
let(:object_json) { 'bar' }
before do
@@ -122,7 +122,7 @@ RSpec.describe ActivityPub::Activity::Reject do
end
end
context 'given a relay' do
context 'when given a relay' do
subject { described_class.new(json, sender) }
let!(:relay) { Fabricate(:relay, state: :pending, follow_activity_id: 'https://abc-123/456') }