about summary refs log tree commit diff
path: root/spec/controllers/admin
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-19 20:33:27 -0500
committerGitHub <noreply@github.com>2023-02-20 02:33:27 +0100
commit65ba0d92ef78f82a3cf5bf04f13b3d7393da015d (patch)
tree7f7d4987d1a2c4ef545ba04305af67ebb5dba203 /spec/controllers/admin
parenta2fdb388eb412f3f90ec48bc990c7c2c24b8c072 (diff)
Enable Rubocop RSpec/NotToNot (#23723)
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r--spec/controllers/admin/account_moderation_notes_controller_spec.rb2
-rw-r--r--spec/controllers/admin/accounts_controller_spec.rb12
-rw-r--r--spec/controllers/admin/change_email_controller_spec.rb2
-rw-r--r--spec/controllers/admin/confirmations_controller_spec.rb2
-rw-r--r--spec/controllers/admin/domain_blocks_controller_spec.rb2
-rw-r--r--spec/controllers/admin/report_notes_controller_spec.rb4
6 files changed, 12 insertions, 12 deletions
diff --git a/spec/controllers/admin/account_moderation_notes_controller_spec.rb b/spec/controllers/admin/account_moderation_notes_controller_spec.rb
index d3f3263f8..b8d606322 100644
--- a/spec/controllers/admin/account_moderation_notes_controller_spec.rb
+++ b/spec/controllers/admin/account_moderation_notes_controller_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe Admin::AccountModerationNotesController, type: :controller do
       let(:params) { { account_moderation_note: { target_account_id: target_account.id, content: '' } } }
 
       it 'falls to create a note' do
-        expect { subject }.not_to change { AccountModerationNote.count }
+        expect { subject }.to_not change { AccountModerationNote.count }
         expect(subject).to render_template 'admin/accounts/show'
       end
     end
diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb
index 48204b7b6..35d79740a 100644
--- a/spec/controllers/admin/accounts_controller_spec.rb
+++ b/spec/controllers/admin/accounts_controller_spec.rb
@@ -84,7 +84,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
 
         it 'fails to memorialize account' do
           is_expected.to have_http_status :forbidden
-          expect(account.reload).not_to be_memorial
+          expect(account.reload).to_not be_memorial
         end
       end
 
@@ -106,7 +106,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
 
         it 'fails to memorialize account' do
           is_expected.to have_http_status :forbidden
-          expect(account.reload).not_to be_memorial
+          expect(account.reload).to_not be_memorial
         end
       end
 
@@ -115,7 +115,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
 
         it 'fails to memorialize account' do
           is_expected.to have_http_status :forbidden
-          expect(account.reload).not_to be_memorial
+          expect(account.reload).to_not be_memorial
         end
       end
     end
@@ -133,7 +133,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
 
       it 'succeeds in enabling account' do
         is_expected.to redirect_to admin_account_path(account.id)
-        expect(user.reload).not_to be_disabled
+        expect(user.reload).to_not be_disabled
       end
     end
 
@@ -183,7 +183,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
 
       it 'fails to approve account' do
         is_expected.to have_http_status :forbidden
-        expect(user.reload).not_to be_approved
+        expect(user.reload).to_not be_approved
       end
     end
   end
@@ -223,7 +223,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
 
       it 'fails to reject account' do
         is_expected.to have_http_status :forbidden
-        expect(user.reload).not_to be_approved
+        expect(user.reload).to_not be_approved
       end
     end
   end
diff --git a/spec/controllers/admin/change_email_controller_spec.rb b/spec/controllers/admin/change_email_controller_spec.rb
index 0814f327d..520842a19 100644
--- a/spec/controllers/admin/change_email_controller_spec.rb
+++ b/spec/controllers/admin/change_email_controller_spec.rb
@@ -35,7 +35,7 @@ RSpec.describe Admin::ChangeEmailsController, type: :controller do
 
       expect(user.email).to eq previous_email
       expect(user.unconfirmed_email).to eq 'test@example.com'
-      expect(user.confirmation_token).not_to be_nil
+      expect(user.confirmation_token).to_not be_nil
 
       expect(UserMailer).to have_received(:confirmation_instructions).with(user, user.confirmation_token, { to: 'test@example.com' })
 
diff --git a/spec/controllers/admin/confirmations_controller_spec.rb b/spec/controllers/admin/confirmations_controller_spec.rb
index 6268903c4..7ca90f3e1 100644
--- a/spec/controllers/admin/confirmations_controller_spec.rb
+++ b/spec/controllers/admin/confirmations_controller_spec.rb
@@ -55,7 +55,7 @@ RSpec.describe Admin::ConfirmationsController, type: :controller do
       it 'does not resend confirmation mail' do
         expect(subject).to redirect_to admin_accounts_path
         expect(flash[:error]).to eq I18n.t('admin.accounts.resend_confirmation.already_confirmed')
-        expect(UserMailer).not_to have_received(:confirmation_instructions)
+        expect(UserMailer).to_not have_received(:confirmation_instructions)
       end
     end
   end
diff --git a/spec/controllers/admin/domain_blocks_controller_spec.rb b/spec/controllers/admin/domain_blocks_controller_spec.rb
index 3b2fd6c5d..92fc19efa 100644
--- a/spec/controllers/admin/domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/domain_blocks_controller_spec.rb
@@ -54,7 +54,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
 
       post :create, params: { domain_block: { domain: 'example.com', severity: 'silence' } }
 
-      expect(DomainBlockWorker).not_to have_received(:perform_async)
+      expect(DomainBlockWorker).to_not have_received(:perform_async)
       expect(response).to render_template :new
     end
 
diff --git a/spec/controllers/admin/report_notes_controller_spec.rb b/spec/controllers/admin/report_notes_controller_spec.rb
index fa7572d18..8a2603611 100644
--- a/spec/controllers/admin/report_notes_controller_spec.rb
+++ b/spec/controllers/admin/report_notes_controller_spec.rb
@@ -34,7 +34,7 @@ describe Admin::ReportNotesController do
 
           it 'creates a report note and does not resolve report' do
             expect { subject }.to change { ReportNote.count }.by(1)
-            expect(report.reload).not_to be_action_taken
+            expect(report.reload).to_not be_action_taken
             expect(subject).to redirect_to admin_report_path(report)
           end
         end
@@ -49,7 +49,7 @@ describe Admin::ReportNotesController do
 
           it 'creates a report note and unresolves report' do
             expect { subject }.to change { ReportNote.count }.by(1)
-            expect(report.reload).not_to be_action_taken
+            expect(report.reload).to_not be_action_taken
             expect(subject).to redirect_to admin_report_path(report)
           end
         end