From 1c6588accca23599ea1537ec527a5be04408b2af Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 8 Jan 2019 13:39:49 +0100 Subject: Redesign admin instances area (#9645) --- .../admin/domain_blocks_controller_spec.rb | 24 ++-------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'spec/controllers/admin') 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 -- cgit