From 518f06cf75cebf0538791cd784b60459a566108c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Meny?= Date: Wed, 9 Feb 2022 15:58:04 +0000 Subject: [PATCH] Fix broken tests --- .../admin/case_logs_controller_spec.rb | 4 ++++ .../admin/dashboard_controller_spec.rb | 4 ++++ spec/fixtures/exports/case_logs.xml | 20 ++++++++----------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/spec/controllers/admin/case_logs_controller_spec.rb b/spec/controllers/admin/case_logs_controller_spec.rb index 31b79a5bd..49cb78339 100644 --- a/spec/controllers/admin/case_logs_controller_spec.rb +++ b/spec/controllers/admin/case_logs_controller_spec.rb @@ -2,6 +2,10 @@ require "rails_helper" require_relative "../../support/devise" describe Admin::CaseLogsController, type: :controller do + before do + sign_in admin_user + end + render_views let(:page) { Capybara::Node::Simple.new(response.body) } let(:resource_title) { "Logs" } diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb index d6fa9fe0c..141f53b88 100644 --- a/spec/controllers/admin/dashboard_controller_spec.rb +++ b/spec/controllers/admin/dashboard_controller_spec.rb @@ -2,6 +2,10 @@ require "rails_helper" require_relative "../../support/devise" describe Admin::DashboardController, type: :controller do + before do + sign_in admin_user + end + render_views let(:page) { Capybara::Node::Simple.new(response.body) } let(:resource_title) { "Dashboard" } diff --git a/spec/fixtures/exports/case_logs.xml b/spec/fixtures/exports/case_logs.xml index 1224b71d0..6653465bb 100644 --- a/spec/fixtures/exports/case_logs.xml +++ b/spec/fixtures/exports/case_logs.xml @@ -60,6 +60,7 @@ 3 2 Yes + 68 Weekly Some Every 2 weeks @@ -94,11 +95,8 @@ No No No - - Yes - No Test Test @@ -123,7 +121,7 @@ 2 2022 1 - + No 2022-02-08 16:52:15 +0000 A current or former regular in the UK Armed Forces (excluding National Service) @@ -145,13 +143,12 @@ 0 0 2 - Weekly + Yes Yes No No No Yes - 68 200.0 50.0 @@ -160,6 +157,7 @@ 325.0 12.0 7.0 + Yes
{id_2} @@ -221,6 +219,7 @@ 3 2 Yes + 68 Weekly Some Every 2 weeks @@ -255,11 +254,8 @@ No No No - - Yes - No Test Test @@ -284,7 +280,7 @@ 2 2022 1 - + No 2022-02-08 16:52:15 +0000 A current or former regular in the UK Armed Forces (excluding National Service) @@ -306,13 +302,12 @@ 0 0 2 - Weekly + Yes Yes No No No Yes - 68 200.0 50.0 @@ -321,5 +316,6 @@ 325.0 12.0 7.0 + Yes