From 9094c2f52c24e1c00b594e7c11cd00e4a07eb431 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 5 Jul 2022 12:00:27 +0200 Subject: [PATCH] Fix tests --- spec/controllers/admin/domain_allows_controller_spec.rb | 2 +- spec/controllers/admin/export_domain_allows_controller_spec.rb | 2 +- spec/controllers/admin/export_domain_blocks_controller_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/controllers/admin/domain_allows_controller_spec.rb b/spec/controllers/admin/domain_allows_controller_spec.rb index 8bacdd3e40..6c4e677876 100644 --- a/spec/controllers/admin/domain_allows_controller_spec.rb +++ b/spec/controllers/admin/domain_allows_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Admin::DomainAllowsController, type: :controller do render_views before do - sign_in Fabricate(:user, admin: true), scope: :user + sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user end describe 'GET #new' do diff --git a/spec/controllers/admin/export_domain_allows_controller_spec.rb b/spec/controllers/admin/export_domain_allows_controller_spec.rb index f6275c2d65..1e1a5ae7d4 100644 --- a/spec/controllers/admin/export_domain_allows_controller_spec.rb +++ b/spec/controllers/admin/export_domain_allows_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Admin::ExportDomainAllowsController, type: :controller do render_views before do - sign_in Fabricate(:user, admin: true), scope: :user + sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user end describe 'GET #export' do diff --git a/spec/controllers/admin/export_domain_blocks_controller_spec.rb b/spec/controllers/admin/export_domain_blocks_controller_spec.rb index 0493df8591..8697e0c215 100644 --- a/spec/controllers/admin/export_domain_blocks_controller_spec.rb +++ b/spec/controllers/admin/export_domain_blocks_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Admin::ExportDomainBlocksController, type: :controller do render_views before do - sign_in Fabricate(:user, admin: true), scope: :user + sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user end describe 'GET #export' do