about summary refs log tree commit diff
path: root/spec/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-01-08 13:39:49 +0100
committerGitHub <noreply@github.com>2019-01-08 13:39:49 +0100
commit1c6588accca23599ea1537ec527a5be04408b2af (patch)
treefd0b7af844699dc38829e776ff5a42987b6b1193 /spec/controllers
parent9a38357111049c7587c898b2b623cf9c853a4d35 (diff)
Redesign admin instances area (#9645)
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/admin/domain_blocks_controller_spec.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/spec/controllers/admin/domain_blocks_controller_spec.rb b/spec/controllers/admin/domain_blocks_controller_spec.rb
index 79e7fea42..129bf8883 100644
--- a/spec/controllers/admin/domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/domain_blocks_controller_spec.rb
@@ -7,26 +7,6 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
     sign_in Fabricate(:user, admin: true), scope: :user
   end
 
-  describe 'GET #index' do
-    around do |example|
-      default_per_page = DomainBlock.default_per_page
-      DomainBlock.paginates_per 1
-      example.run
-      DomainBlock.paginates_per default_per_page
-    end
-
-    it 'renders domain blocks' do
-      2.times { Fabricate(:domain_block) }
-
-      get :index, params: { page: 2 }
-
-      assigned = assigns(:domain_blocks)
-      expect(assigned.count).to eq 1
-      expect(assigned.klass).to be DomainBlock
-      expect(response).to have_http_status(200)
-    end
-  end
-
   describe 'GET #new' do
     it 'assigns a new domain block' do
       get :new
@@ -53,7 +33,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
 
       expect(DomainBlockWorker).to have_received(:perform_async)
       expect(flash[:notice]).to eq I18n.t('admin.domain_blocks.created_msg')
-      expect(response).to redirect_to(admin_domain_blocks_path)
+      expect(response).to redirect_to(admin_instances_path(limited: '1'))
     end
 
     it 'renders new when failed to save' do
@@ -76,7 +56,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
 
       expect(service).to have_received(:call).with(domain_block, true)
       expect(flash[:notice]).to eq I18n.t('admin.domain_blocks.destroyed_msg')
-      expect(response).to redirect_to(admin_domain_blocks_path)
+      expect(response).to redirect_to(admin_instances_path(limited: '1'))
     end
   end
 end