about summary refs log tree commit diff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-19 23:24:14 -0500
committerGitHub <noreply@github.com>2023-02-20 13:24:14 +0900
commit4552685f6bd400666ec4058783eeabb11568e575 (patch)
treeab708e0d54b9309f96ef0e4d17e8afd32221c5c6 /spec/models/concerns
parent4ea1e0fceb0c0c5fee014a99f81f8f13a16f6dde (diff)
Autofix Rubocop RSpec/LeadingSubject (#23670)
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/account_interactions_spec.rb40
1 files changed, 20 insertions, 20 deletions
diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb
index fbfc9fbbc..ed3fc056b 100644
--- a/spec/models/concerns/account_interactions_spec.rb
+++ b/spec/models/concerns/account_interactions_spec.rb
@@ -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)