about summary refs log tree commit diff
path: root/spec/controllers/admin
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r--spec/controllers/admin/accounts_controller_spec.rb4
-rw-r--r--spec/controllers/admin/change_email_controller_spec.rb2
-rw-r--r--spec/controllers/admin/confirmations_controller_spec.rb4
-rw-r--r--spec/controllers/admin/domain_blocks_controller_spec.rb6
-rw-r--r--spec/controllers/admin/email_domain_blocks_controller_spec.rb4
-rw-r--r--spec/controllers/admin/instances_controller_spec.rb2
-rw-r--r--spec/controllers/admin/reported_statuses_controller_spec.rb4
-rw-r--r--spec/controllers/admin/reports_controller_spec.rb8
-rw-r--r--spec/controllers/admin/settings_controller_spec.rb2
-rw-r--r--spec/controllers/admin/statuses_controller_spec.rb6
-rw-r--r--spec/controllers/admin/subscriptions_controller_spec.rb2
11 files changed, 22 insertions, 22 deletions
diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb
index 8be27d866..ff9dbbfb8 100644
--- a/spec/controllers/admin/accounts_controller_spec.rb
+++ b/spec/controllers/admin/accounts_controller_spec.rb
@@ -63,7 +63,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
 
     it 'returns http success' do
       get :index
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
@@ -72,7 +72,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
 
     it 'returns http success' do
       get :show, params: { id: account.id }
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 end
diff --git a/spec/controllers/admin/change_email_controller_spec.rb b/spec/controllers/admin/change_email_controller_spec.rb
index 50f94f835..31df0f0fc 100644
--- a/spec/controllers/admin/change_email_controller_spec.rb
+++ b/spec/controllers/admin/change_email_controller_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe Admin::ChangeEmailsController, type: :controller do
 
       get :show, params: { account_id: account.id }
 
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
diff --git a/spec/controllers/admin/confirmations_controller_spec.rb b/spec/controllers/admin/confirmations_controller_spec.rb
index 3f2b28c0e..7c8034964 100644
--- a/spec/controllers/admin/confirmations_controller_spec.rb
+++ b/spec/controllers/admin/confirmations_controller_spec.rb
@@ -20,14 +20,14 @@ RSpec.describe Admin::ConfirmationsController, type: :controller do
     it 'raises an error when there is no account' do
       post :create, params: { account_id: 'fake' }
 
-      expect(response).to have_http_status(:missing)
+      expect(response).to have_http_status(404)
     end
 
     it 'raises an error when there is no user' do
       account = Fabricate(:account, user: nil)
       post :create, params: { account_id: account.id }
 
-      expect(response).to have_http_status(:missing)
+      expect(response).to have_http_status(404)
     end
   end
 end
diff --git a/spec/controllers/admin/domain_blocks_controller_spec.rb b/spec/controllers/admin/domain_blocks_controller_spec.rb
index b9e73c04b..79e7fea42 100644
--- a/spec/controllers/admin/domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/domain_blocks_controller_spec.rb
@@ -23,7 +23,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
       assigned = assigns(:domain_blocks)
       expect(assigned.count).to eq 1
       expect(assigned.klass).to be DomainBlock
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
@@ -32,7 +32,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
       get :new
 
       expect(assigns(:domain_block)).to be_instance_of(DomainBlock)
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
@@ -41,7 +41,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
       domain_block = Fabricate(:domain_block)
       get :show, params: { id: domain_block.id }
 
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
diff --git a/spec/controllers/admin/email_domain_blocks_controller_spec.rb b/spec/controllers/admin/email_domain_blocks_controller_spec.rb
index 295de9073..133d38ff1 100644
--- a/spec/controllers/admin/email_domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/email_domain_blocks_controller_spec.rb
@@ -25,7 +25,7 @@ RSpec.describe Admin::EmailDomainBlocksController, type: :controller do
       assigned = assigns(:email_domain_blocks)
       expect(assigned.count).to eq 1
       expect(assigned.klass).to be EmailDomainBlock
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
@@ -34,7 +34,7 @@ RSpec.describe Admin::EmailDomainBlocksController, type: :controller do
       get :new
 
       expect(assigns(:email_domain_block)).to be_instance_of(EmailDomainBlock)
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
diff --git a/spec/controllers/admin/instances_controller_spec.rb b/spec/controllers/admin/instances_controller_spec.rb
index f57e3fa97..412b81443 100644
--- a/spec/controllers/admin/instances_controller_spec.rb
+++ b/spec/controllers/admin/instances_controller_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe Admin::InstancesController, type: :controller do
       expect(instances.size).to eq 1
       expect(instances[0].domain).to eq 'less.popular'
 
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 end
diff --git a/spec/controllers/admin/reported_statuses_controller_spec.rb b/spec/controllers/admin/reported_statuses_controller_spec.rb
index 297807d41..29957ed37 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, form_status_batch: { action: action, status_ids: status_ids } } }
+      -> { post :create, params: { :report_id  => report, action => '', :form_status_batch => { status_ids: status_ids } } }
     end
 
     let(:action) { 'nsfw_on' }
@@ -84,7 +84,7 @@ describe Admin::ReportedStatusesController do
       allow(RemovalWorker).to receive(:perform_async)
 
       delete :destroy, params: { report_id: report, id: status }
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
       expect(RemovalWorker).
         to have_received(:perform_async).with(status.id)
     end
diff --git a/spec/controllers/admin/reports_controller_spec.rb b/spec/controllers/admin/reports_controller_spec.rb
index 9be298df6..e50c02a72 100644
--- a/spec/controllers/admin/reports_controller_spec.rb
+++ b/spec/controllers/admin/reports_controller_spec.rb
@@ -18,7 +18,7 @@ describe Admin::ReportsController do
       reports = assigns(:reports).to_a
       expect(reports.size).to eq 1
       expect(reports[0]).to eq specified
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
 
     it 'returns http success with resolved filter' do
@@ -31,7 +31,7 @@ describe Admin::ReportsController do
       expect(reports.size).to eq 1
       expect(reports[0]).to eq specified
 
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
@@ -42,7 +42,7 @@ describe Admin::ReportsController do
       get :show, params: { id: report }
 
       expect(assigns(:report)).to eq report
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
@@ -52,7 +52,7 @@ describe Admin::ReportsController do
         report = Fabricate(:report)
         put :update, params: { id: report, outcome: 'unknown' }
 
-        expect(response).to have_http_status(:missing)
+        expect(response).to have_http_status(404)
       end
     end
 
diff --git a/spec/controllers/admin/settings_controller_spec.rb b/spec/controllers/admin/settings_controller_spec.rb
index 609bc762b..eaf99679a 100644
--- a/spec/controllers/admin/settings_controller_spec.rb
+++ b/spec/controllers/admin/settings_controller_spec.rb
@@ -14,7 +14,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
       it 'returns http success' do
         get :edit
 
-        expect(response).to have_http_status(:success)
+        expect(response).to have_http_status(200)
       end
     end
 
diff --git a/spec/controllers/admin/statuses_controller_spec.rb b/spec/controllers/admin/statuses_controller_spec.rb
index 1515e299b..cbaf39786 100644
--- a/spec/controllers/admin/statuses_controller_spec.rb
+++ b/spec/controllers/admin/statuses_controller_spec.rb
@@ -20,7 +20,7 @@ describe Admin::StatusesController do
 
       statuses = assigns(:statuses).to_a
       expect(statuses.size).to eq 2
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
 
     it 'returns http success with media' do
@@ -28,7 +28,7 @@ describe Admin::StatusesController do
 
       statuses = assigns(:statuses).to_a
       expect(statuses.size).to eq 1
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 
@@ -99,7 +99,7 @@ describe Admin::StatusesController do
       allow(RemovalWorker).to receive(:perform_async)
 
       delete :destroy, params: { account_id: account.id, id: status }
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
       expect(RemovalWorker).
         to have_received(:perform_async).with(status.id)
     end
diff --git a/spec/controllers/admin/subscriptions_controller_spec.rb b/spec/controllers/admin/subscriptions_controller_spec.rb
index eb6f12b16..967152abe 100644
--- a/spec/controllers/admin/subscriptions_controller_spec.rb
+++ b/spec/controllers/admin/subscriptions_controller_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe Admin::SubscriptionsController, type: :controller do
       expect(subscriptions.count).to eq 1
       expect(subscriptions[0]).to eq specified
 
-      expect(response).to have_http_status(:success)
+      expect(response).to have_http_status(200)
     end
   end
 end