about summary refs log tree commit diff
path: root/spec/models
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-17 16:56:20 -0500
committerGitHub <noreply@github.com>2023-02-18 06:56:20 +0900
commit669f6d2c0af969268c76e389ed626bce0cc9f998 (patch)
treef22f0314ee6f7e348b3ead9c22b93cf0fcc6303c /spec/models
parent593bb8ce99b31f85a1c8f9bfbe34bd87b079581c (diff)
Run rubocop formatting except line length (#23632)
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/account/field_spec.rb4
-rw-r--r--spec/models/account_alias_spec.rb1
-rw-r--r--spec/models/account_statuses_cleanup_policy_spec.rb40
-rw-r--r--spec/models/concerns/account_interactions_spec.rb2
-rw-r--r--spec/models/device_spec.rb1
-rw-r--r--spec/models/encrypted_message_spec.rb1
-rw-r--r--spec/models/export_spec.rb2
-rw-r--r--spec/models/login_activity_spec.rb1
-rw-r--r--spec/models/one_time_key_spec.rb1
-rw-r--r--spec/models/system_key_spec.rb1
-rw-r--r--spec/models/trends/statuses_spec.rb2
-rw-r--r--spec/models/user_role_spec.rb2
12 files changed, 25 insertions, 33 deletions
diff --git a/spec/models/account/field_spec.rb b/spec/models/account/field_spec.rb
index 0ac9769bc..40bbee025 100644
--- a/spec/models/account/field_spec.rb
+++ b/spec/models/account/field_spec.rb
@@ -97,7 +97,7 @@ RSpec.describe Account::Field, type: :model do
           expect(subject.verifiable?).to be false
         end
       end
-      
+
       context 'for text which is blank' do
         let(:value) { '' }
 
@@ -149,7 +149,7 @@ RSpec.describe Account::Field, type: :model do
           expect(subject.verifiable?).to be false
         end
       end
-      
+
       context 'for text which is blank' do
         let(:value) { '' }
 
diff --git a/spec/models/account_alias_spec.rb b/spec/models/account_alias_spec.rb
index 27ec215aa..c48b804b2 100644
--- a/spec/models/account_alias_spec.rb
+++ b/spec/models/account_alias_spec.rb
@@ -1,5 +1,4 @@
 require 'rails_helper'
 
 RSpec.describe AccountAlias, type: :model do
-
 end
diff --git a/spec/models/account_statuses_cleanup_policy_spec.rb b/spec/models/account_statuses_cleanup_policy_spec.rb
index 684a1aa41..f11684516 100644
--- a/spec/models/account_statuses_cleanup_policy_spec.rb
+++ b/spec/models/account_statuses_cleanup_policy_spec.rb
@@ -16,16 +16,15 @@ RSpec.describe AccountStatusesCleanupPolicy, type: :model do
     context 'when widening a policy' do
       let!(:account_statuses_cleanup_policy) do
         Fabricate(:account_statuses_cleanup_policy,
-          account: account,
-          keep_direct: true,
-          keep_pinned: true,
-          keep_polls: true,
-          keep_media: true,
-          keep_self_fav: true,
-          keep_self_bookmark: true,
-          min_favs: 1,
-          min_reblogs: 1
-        )
+                  account: account,
+                  keep_direct: true,
+                  keep_pinned: true,
+                  keep_polls: true,
+                  keep_media: true,
+                  keep_self_fav: true,
+                  keep_self_bookmark: true,
+                  min_favs: 1,
+                  min_reblogs: 1)
       end
 
       before do
@@ -96,16 +95,15 @@ RSpec.describe AccountStatusesCleanupPolicy, type: :model do
     context 'when narrowing a policy' do
       let!(:account_statuses_cleanup_policy) do
         Fabricate(:account_statuses_cleanup_policy,
-          account: account,
-          keep_direct: false,
-          keep_pinned: false,
-          keep_polls: false,
-          keep_media: false,
-          keep_self_fav: false,
-          keep_self_bookmark: false,
-          min_favs: nil,
-          min_reblogs: nil
-        )
+                  account: account,
+                  keep_direct: false,
+                  keep_pinned: false,
+                  keep_polls: false,
+                  keep_media: false,
+                  keep_self_fav: false,
+                  keep_self_bookmark: false,
+                  min_favs: nil,
+                  min_reblogs: nil)
       end
 
       it 'does not unnecessarily invalidate last_inspected' do
@@ -232,7 +230,7 @@ RSpec.describe AccountStatusesCleanupPolicy, type: :model do
   end
 
   describe '#compute_cutoff_id' do
-    let!(:unrelated_status)  { Fabricate(:status, created_at: 3.years.ago) }
+    let!(:unrelated_status) { Fabricate(:status, created_at: 3.years.ago) }
     let(:account_statuses_cleanup_policy) { Fabricate(:account_statuses_cleanup_policy, account: account) }
 
     subject { account_statuses_cleanup_policy.compute_cutoff_id }
diff --git a/spec/models/concerns/account_interactions_spec.rb b/spec/models/concerns/account_interactions_spec.rb
index 5cb4a83f7..e628384d0 100644
--- a/spec/models/concerns/account_interactions_spec.rb
+++ b/spec/models/concerns/account_interactions_spec.rb
@@ -400,7 +400,7 @@ describe AccountInteractions do
     subject { account.domain_blocking?(domain) }
 
     context 'blocking the domain' do
-      it' returns true' do
+      it ' returns true' do
         account_domain_block = Fabricate(:account_domain_block, domain: domain)
         account.domain_blocks << account_domain_block
         is_expected.to be true
diff --git a/spec/models/device_spec.rb b/spec/models/device_spec.rb
index f56fbf978..307552e91 100644
--- a/spec/models/device_spec.rb
+++ b/spec/models/device_spec.rb
@@ -1,5 +1,4 @@
 require 'rails_helper'
 
 RSpec.describe Device, type: :model do
-
 end
diff --git a/spec/models/encrypted_message_spec.rb b/spec/models/encrypted_message_spec.rb
index 1238d57b6..64f9c6912 100644
--- a/spec/models/encrypted_message_spec.rb
+++ b/spec/models/encrypted_message_spec.rb
@@ -1,5 +1,4 @@
 require 'rails_helper'
 
 RSpec.describe EncryptedMessage, type: :model do
-
 end
diff --git a/spec/models/export_spec.rb b/spec/models/export_spec.rb
index 135d7a36b..5202ae9e1 100644
--- a/spec/models/export_spec.rb
+++ b/spec/models/export_spec.rb
@@ -3,7 +3,7 @@ require 'rails_helper'
 describe Export do
   let(:account) { Fabricate(:account) }
   let(:target_accounts) do
-    [ {}, { username: 'one', domain: 'local.host' } ].map(&method(:Fabricate).curry(2).call(:account))
+    [{}, { username: 'one', domain: 'local.host' }].map(&method(:Fabricate).curry(2).call(:account))
   end
 
   describe 'to_csv' do
diff --git a/spec/models/login_activity_spec.rb b/spec/models/login_activity_spec.rb
index ba2d207c9..12d8c4363 100644
--- a/spec/models/login_activity_spec.rb
+++ b/spec/models/login_activity_spec.rb
@@ -1,5 +1,4 @@
 require 'rails_helper'
 
 RSpec.describe LoginActivity, type: :model do
-
 end
diff --git a/spec/models/one_time_key_spec.rb b/spec/models/one_time_key_spec.rb
index 34598334c..4b231c600 100644
--- a/spec/models/one_time_key_spec.rb
+++ b/spec/models/one_time_key_spec.rb
@@ -1,5 +1,4 @@
 require 'rails_helper'
 
 RSpec.describe OneTimeKey, type: :model do
-
 end
diff --git a/spec/models/system_key_spec.rb b/spec/models/system_key_spec.rb
index a138bc131..86f07f964 100644
--- a/spec/models/system_key_spec.rb
+++ b/spec/models/system_key_spec.rb
@@ -1,5 +1,4 @@
 require 'rails_helper'
 
 RSpec.describe SystemKey, type: :model do
-
 end
diff --git a/spec/models/trends/statuses_spec.rb b/spec/models/trends/statuses_spec.rb
index 5f338a65e..98a8c7264 100644
--- a/spec/models/trends/statuses_spec.rb
+++ b/spec/models/trends/statuses_spec.rb
@@ -76,7 +76,7 @@ RSpec.describe Trends::Statuses do
     before do
       13.times { reblog(status1, today) }
       13.times { reblog(status2, today) }
-       4.times { reblog(status3, today) }
+      4.times { reblog(status3, today) }
     end
 
     context do
diff --git a/spec/models/user_role_spec.rb b/spec/models/user_role_spec.rb
index 28019593e..abf7d0e27 100644
--- a/spec/models/user_role_spec.rb
+++ b/spec/models/user_role_spec.rb
@@ -58,7 +58,7 @@ RSpec.describe UserRole, type: :model do
   end
 
   describe '#permissions_as_keys=' do
-    let(:input) { }
+    let(:input) {}
 
     before do
       subject.permissions_as_keys = input