Autofix Rubocop RSpec/LeadingSubject (#23670)
This commit is contained in:
parent
4ea1e0fceb
commit
4552685f6b
78 changed files with 256 additions and 338 deletions
|
@ -225,10 +225,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#mute_conversation!' do
|
||||
let(:conversation) { Fabricate(:conversation) }
|
||||
|
||||
subject { account.mute_conversation!(conversation) }
|
||||
|
||||
let(:conversation) { Fabricate(:conversation) }
|
||||
|
||||
it 'creates and returns ConversationMute' do
|
||||
expect do
|
||||
expect(subject).to be_a ConversationMute
|
||||
|
@ -237,10 +237,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#block_domain!' do
|
||||
let(:domain) { 'example.com' }
|
||||
|
||||
subject { account.block_domain!(domain) }
|
||||
|
||||
let(:domain) { 'example.com' }
|
||||
|
||||
it 'creates and returns AccountDomainBlock' do
|
||||
expect do
|
||||
expect(subject).to be_a AccountDomainBlock
|
||||
|
@ -303,10 +303,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#unmute_conversation!' do
|
||||
let(:conversation) { Fabricate(:conversation) }
|
||||
|
||||
subject { account.unmute_conversation!(conversation) }
|
||||
|
||||
let(:conversation) { Fabricate(:conversation) }
|
||||
|
||||
context 'muting the conversation' do
|
||||
it 'returns destroyed ConversationMute' do
|
||||
account.conversation_mutes.create(conversation: conversation)
|
||||
|
@ -323,10 +323,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#unblock_domain!' do
|
||||
let(:domain) { 'example.com' }
|
||||
|
||||
subject { account.unblock_domain!(domain) }
|
||||
|
||||
let(:domain) { 'example.com' }
|
||||
|
||||
context 'blocking the domain' do
|
||||
it 'returns destroyed AccountDomainBlock' do
|
||||
account_domain_block = Fabricate(:account_domain_block, domain: domain)
|
||||
|
@ -395,10 +395,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#domain_blocking?' do
|
||||
let(:domain) { 'example.com' }
|
||||
|
||||
subject { account.domain_blocking?(domain) }
|
||||
|
||||
let(:domain) { 'example.com' }
|
||||
|
||||
context 'blocking the domain' do
|
||||
it 'returns true' do
|
||||
account_domain_block = Fabricate(:account_domain_block, domain: domain)
|
||||
|
@ -433,10 +433,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#muting_conversation?' do
|
||||
let(:conversation) { Fabricate(:conversation) }
|
||||
|
||||
subject { account.muting_conversation?(conversation) }
|
||||
|
||||
let(:conversation) { Fabricate(:conversation) }
|
||||
|
||||
context 'muting the conversation' do
|
||||
it 'returns true' do
|
||||
account.conversation_mutes.create(conversation: conversation)
|
||||
|
@ -452,13 +452,13 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#muting_notifications?' do
|
||||
subject { account.muting_notifications?(target_account) }
|
||||
|
||||
before do
|
||||
mute = Fabricate(:mute, target_account: target_account, account: account, hide_notifications: hide)
|
||||
account.mute_relationships << mute
|
||||
end
|
||||
|
||||
subject { account.muting_notifications?(target_account) }
|
||||
|
||||
context 'muting notifications of target_account' do
|
||||
let(:hide) { true }
|
||||
|
||||
|
@ -494,10 +494,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#favourited?' do
|
||||
let(:status) { Fabricate(:status, account: account, favourites: favourites) }
|
||||
|
||||
subject { account.favourited?(status) }
|
||||
|
||||
let(:status) { Fabricate(:status, account: account, favourites: favourites) }
|
||||
|
||||
context 'favorited' do
|
||||
let(:favourites) { [Fabricate(:favourite, account: account)] }
|
||||
|
||||
|
@ -516,10 +516,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#reblogged?' do
|
||||
let(:status) { Fabricate(:status, account: account, reblogs: reblogs) }
|
||||
|
||||
subject { account.reblogged?(status) }
|
||||
|
||||
let(:status) { Fabricate(:status, account: account, reblogs: reblogs) }
|
||||
|
||||
context 'reblogged' do
|
||||
let(:reblogs) { [Fabricate(:status, account: account)] }
|
||||
|
||||
|
@ -538,10 +538,10 @@ describe AccountInteractions do
|
|||
end
|
||||
|
||||
describe '#pinned?' do
|
||||
let(:status) { Fabricate(:status, account: account) }
|
||||
|
||||
subject { account.pinned?(status) }
|
||||
|
||||
let(:status) { Fabricate(:status, account: account) }
|
||||
|
||||
context 'pinned' do
|
||||
it 'returns true' do
|
||||
Fabricate(:status_pin, account: account, status: status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue