about summary refs log tree commit diff
path: root/spec/controllers/admin
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-02-20 22:41:20 +0100
committerGitHub <noreply@github.com>2023-02-20 22:41:20 +0100
commit45087c1092143e95dfcc85b6c9abc5c6c0a0a5c2 (patch)
treee4be53cb0b2e7f876bea6c61d4fe64d7586ae63d /spec/controllers/admin
parent4c68189d2b8b6a9a74fc13862b11bf6c6d523409 (diff)
parentdc0cc5a57d224b4c53bc58dad919b727055bd9a3 (diff)
Merge pull request #2117 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r--spec/controllers/admin/accounts_controller_spec.rb2
-rw-r--r--spec/controllers/admin/change_email_controller_spec.rb8
-rw-r--r--spec/controllers/admin/dashboard_controller_spec.rb8
-rw-r--r--spec/controllers/admin/domain_blocks_controller_spec.rb6
-rw-r--r--spec/controllers/admin/reports_controller_spec.rb1
-rw-r--r--spec/controllers/admin/resets_controller_spec.rb1
6 files changed, 14 insertions, 12 deletions
diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb
index 81d592ddd..48204b7b6 100644
--- a/spec/controllers/admin/accounts_controller_spec.rb
+++ b/spec/controllers/admin/accounts_controller_spec.rb
@@ -39,7 +39,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
         username: 'username',
         display_name: 'display name',
         email: 'local-part@domain',
-        ip: '0.0.0.42'
+        ip: '0.0.0.42',
       }
     end
 
diff --git a/spec/controllers/admin/change_email_controller_spec.rb b/spec/controllers/admin/change_email_controller_spec.rb
index cf8a27d39..0814f327d 100644
--- a/spec/controllers/admin/change_email_controller_spec.rb
+++ b/spec/controllers/admin/change_email_controller_spec.rb
@@ -9,8 +9,8 @@ RSpec.describe Admin::ChangeEmailsController, type: :controller do
     sign_in admin
   end
 
-  describe "GET #show" do
-    it "returns http success" do
+  describe 'GET #show' do
+    it 'returns http success' do
       user = Fabricate(:user)
 
       get :show, params: { account_id: user.account.id }
@@ -19,12 +19,12 @@ RSpec.describe Admin::ChangeEmailsController, type: :controller do
     end
   end
 
-  describe "GET #update" do
+  describe 'GET #update' do
     before do
       allow(UserMailer).to receive(:confirmation_instructions).and_return(double('email', deliver_later: nil))
     end
 
-    it "returns http success" do
+    it 'returns http success' do
       user = Fabricate(:user)
 
       previous_email = user.email
diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb
index 6231a09a2..ab3738fcd 100644
--- a/spec/controllers/admin/dashboard_controller_spec.rb
+++ b/spec/controllers/admin/dashboard_controller_spec.rb
@@ -8,10 +8,10 @@ describe Admin::DashboardController, type: :controller do
   describe 'GET #index' do
     before do
       allow(Admin::SystemCheck).to receive(:perform).and_return([
-        Admin::SystemCheck::Message.new(:database_schema_check),
-        Admin::SystemCheck::Message.new(:rules_check, nil, admin_rules_path),
-        Admin::SystemCheck::Message.new(:sidekiq_process_check, 'foo, bar'),
-      ])
+                                                                  Admin::SystemCheck::Message.new(:database_schema_check),
+                                                                  Admin::SystemCheck::Message.new(:rules_check, nil, admin_rules_path),
+                                                                  Admin::SystemCheck::Message.new(:sidekiq_process_check, 'foo, bar'),
+                                                                ])
       sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin'))
     end
 
diff --git a/spec/controllers/admin/domain_blocks_controller_spec.rb b/spec/controllers/admin/domain_blocks_controller_spec.rb
index f432060d9..3b2fd6c5d 100644
--- a/spec/controllers/admin/domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/domain_blocks_controller_spec.rb
@@ -26,9 +26,9 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
           domain_blocks_attributes: {
             '0' => { enabled: '1', domain: 'example.com', severity: 'silence' },
             '1' => { enabled: '0', domain: 'mastodon.social', severity: 'suspend' },
-            '2' => { enabled: '1', domain: 'mastodon.online', severity: 'suspend' }
-          }
-        }
+            '2' => { enabled: '1', domain: 'mastodon.online', severity: 'suspend' },
+          },
+        },
       }
 
       expect(DomainBlockWorker).to have_received(:perform_async).exactly(2).times
diff --git a/spec/controllers/admin/reports_controller_spec.rb b/spec/controllers/admin/reports_controller_spec.rb
index 4cd1524bf..4dcc277d9 100644
--- a/spec/controllers/admin/reports_controller_spec.rb
+++ b/spec/controllers/admin/reports_controller_spec.rb
@@ -4,6 +4,7 @@ describe Admin::ReportsController do
   render_views
 
   let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+
   before do
     sign_in user, scope: :user
   end
diff --git a/spec/controllers/admin/resets_controller_spec.rb b/spec/controllers/admin/resets_controller_spec.rb
index aeb172318..64fe027fd 100644
--- a/spec/controllers/admin/resets_controller_spec.rb
+++ b/spec/controllers/admin/resets_controller_spec.rb
@@ -4,6 +4,7 @@ describe Admin::ResetsController do
   render_views
 
   let(:account) { Fabricate(:account) }
+
   before do
     sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
   end