From 4f82fde6dff94ff637b39f592bda8e3fcdc95ccb Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 31 Jan 2022 15:17:56 +0000 Subject: [PATCH] fix dashboard controller spec offences --- spec/controllers/admin/dashboard_controller_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb index 8d6712e7b..f23255201 100644 --- a/spec/controllers/admin/dashboard_controller_spec.rb +++ b/spec/controllers/admin/dashboard_controller_spec.rb @@ -10,15 +10,14 @@ describe Admin::DashboardController, type: :controller do render_views let(:page) { Capybara::Node::Simple.new(response.body) } let(:resource_title) { "Dashboard" } - let!(:case_log) { FactoryBot.create(:case_log, :in_progress) } - let!(:case_log_2) { FactoryBot.create(:case_log, :in_progress) } - let!(:completed_case_log) { FactoryBot.create(:case_log, :completed) } let(:valid_session) { {} } login_admin_user describe "Get case logs" do before do + 2.times { |_| FactoryBot.create(:case_log, :in_progress) } + FactoryBot.create(:case_log, :completed) get :index, session: valid_session end