about summary refs log tree commit diff
path: root/spec/controllers/admin
diff options
context:
space:
mode:
authoraus-social <42644106+aus-social@users.noreply.github.com>2018-10-04 20:36:53 +1000
committerEugen Rochko <eugen@zeonfederated.com>2018-10-04 12:36:53 +0200
commit1f98eae1cf916a18007a26e1740b0e65aa7ff752 (patch)
tree9d4a8811cbf8ac39a3c8e4923dd5f18c2563959f /spec/controllers/admin
parent928102284a4e77e5f0ab340f4516749d665c2d67 (diff)
Lint pass (#8876)
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r--spec/controllers/admin/accounts_controller_spec.rb1
-rw-r--r--spec/controllers/admin/email_domain_blocks_controller_spec.rb4
-rw-r--r--spec/controllers/admin/invites_controller_spec.rb2
-rw-r--r--spec/controllers/admin/report_notes_controller_spec.rb11
-rw-r--r--spec/controllers/admin/reported_statuses_controller_spec.rb2
5 files changed, 9 insertions, 11 deletions
diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb
index 197e019fe..fa2786c9b 100644
--- a/spec/controllers/admin/accounts_controller_spec.rb
+++ b/spec/controllers/admin/accounts_controller_spec.rb
@@ -75,7 +75,6 @@ RSpec.describe Admin::AccountsController, type: :controller do
     end
   end
 
-
   describe 'POST #subscribe' do
     subject { post :subscribe, params: { id: account.id } }
 
diff --git a/spec/controllers/admin/email_domain_blocks_controller_spec.rb b/spec/controllers/admin/email_domain_blocks_controller_spec.rb
index 133d38ff1..52db56f4e 100644
--- a/spec/controllers/admin/email_domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/email_domain_blocks_controller_spec.rb
@@ -40,7 +40,7 @@ RSpec.describe Admin::EmailDomainBlocksController, type: :controller do
 
   describe 'POST #create' do
     it 'blocks the domain when succeeded to save' do
-      post :create, params: { email_domain_block: { domain: 'example.com'} }
+      post :create, params: { email_domain_block: { domain: 'example.com' } }
 
       expect(flash[:notice]).to eq I18n.t('admin.email_domain_blocks.created_msg')
       expect(response).to redirect_to(admin_email_domain_blocks_path)
@@ -50,7 +50,7 @@ RSpec.describe Admin::EmailDomainBlocksController, type: :controller do
   describe 'DELETE #destroy' do
     it 'unblocks the domain' do
       email_domain_block = Fabricate(:email_domain_block)
-      delete :destroy, params: { id: email_domain_block.id } 
+      delete :destroy, params: { id: email_domain_block.id }
 
       expect(flash[:notice]).to eq I18n.t('admin.email_domain_blocks.destroyed_msg')
       expect(response).to redirect_to(admin_email_domain_blocks_path)
diff --git a/spec/controllers/admin/invites_controller_spec.rb b/spec/controllers/admin/invites_controller_spec.rb
index e7d995411..34b51a6aa 100644
--- a/spec/controllers/admin/invites_controller_spec.rb
+++ b/spec/controllers/admin/invites_controller_spec.rb
@@ -24,7 +24,7 @@ describe Admin::InvitesController do
     subject { post :create, params: { invite: { max_uses: '10', expires_in: 1800 } } }
 
     it 'succeeds to create a invite' do
-      expect{ subject }.to change { Invite.count }.by(1)
+      expect { subject }.to change { Invite.count }.by(1)
       expect(subject).to redirect_to admin_invites_path
       expect(Invite.last).to have_attributes(user_id: user.id, max_uses: 10)
     end
diff --git a/spec/controllers/admin/report_notes_controller_spec.rb b/spec/controllers/admin/report_notes_controller_spec.rb
index 2c32303fb..ec5872c7d 100644
--- a/spec/controllers/admin/report_notes_controller_spec.rb
+++ b/spec/controllers/admin/report_notes_controller_spec.rb
@@ -15,7 +15,6 @@ describe Admin::ReportNotesController do
     let(:report) { Fabricate(:report, action_taken: action_taken, action_taken_by_account_id: account_id) }
 
     context 'when parameter is valid' do
-
       context 'when report is unsolved' do
         let(:action_taken) { false }
         let(:account_id) { nil }
@@ -24,7 +23,7 @@ describe Admin::ReportNotesController do
           let(:params) { { report_note: { content: 'test content', report_id: report.id }, create_and_resolve: nil } }
 
           it 'creates a report note and resolves report' do
-            expect{ subject }.to change{ ReportNote.count }.by(1)
+            expect { subject }.to change { ReportNote.count }.by(1)
             expect(report.reload).to be_action_taken
             expect(subject).to redirect_to admin_reports_path
           end
@@ -34,7 +33,7 @@ describe Admin::ReportNotesController do
           let(:params) { { report_note: { content: 'test content', report_id: report.id } } }
 
           it 'creates a report note and does not resolve report' do
-            expect{ subject }.to change{ ReportNote.count }.by(1)
+            expect { subject }.to change { ReportNote.count }.by(1)
             expect(report.reload).not_to be_action_taken
             expect(subject).to redirect_to admin_report_path(report)
           end
@@ -49,7 +48,7 @@ describe Admin::ReportNotesController do
           let(:params) { { report_note: { content: 'test content', report_id: report.id }, create_and_unresolve: nil } }
 
           it 'creates a report note and unresolves report' do
-            expect{ subject }.to change{ ReportNote.count }.by(1)
+            expect { subject }.to change { ReportNote.count }.by(1)
             expect(report.reload).not_to be_action_taken
             expect(subject).to redirect_to admin_report_path(report)
           end
@@ -59,7 +58,7 @@ describe Admin::ReportNotesController do
           let(:params) { { report_note: { content: 'test content', report_id: report.id } } }
 
           it 'creates a report note and does not unresolve report' do
-            expect{ subject }.to change{ ReportNote.count }.by(1)
+            expect { subject }.to change { ReportNote.count }.by(1)
             expect(report.reload).to be_action_taken
             expect(subject).to redirect_to admin_report_path(report)
           end
@@ -84,7 +83,7 @@ describe Admin::ReportNotesController do
     let!(:report_note) { Fabricate(:report_note) }
 
     it 'deletes note' do
-      expect{ subject }.to change{ ReportNote.count }.by(-1)
+      expect { subject }.to change { ReportNote.count }.by(-1)
       expect(subject).to redirect_to admin_report_path(report_note.report)
     end
   end
diff --git a/spec/controllers/admin/reported_statuses_controller_spec.rb b/spec/controllers/admin/reported_statuses_controller_spec.rb
index 7adbf36b9..c358506d6 100644
--- a/spec/controllers/admin/reported_statuses_controller_spec.rb
+++ b/spec/controllers/admin/reported_statuses_controller_spec.rb
@@ -13,7 +13,7 @@ describe Admin::ReportedStatusesController do
 
   describe 'POST #create' do
     subject do
-      -> { post :create, params: { :report_id  => report, action => '', :form_status_batch => { status_ids: status_ids } } }
+      -> { post :create, params: { :report_id => report, action => '', :form_status_batch => { status_ids: status_ids } } }
     end
 
     let(:action) { 'nsfw_on' }