From 4ea8afd6d828a96f928b43bec1f3b9cbc12f0334 Mon Sep 17 00:00:00 2001 From: JG Date: Fri, 10 Jun 2022 10:43:31 +0100 Subject: [PATCH] fixed failing tests for support user --- spec/requests/organisations_controller_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 6446d720e..c7423bd15 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -41,6 +41,7 @@ RSpec.describe OrganisationsController, type: :request do let!(:same_org_scheme) { FactoryBot.create(:scheme, organisation: user.organisation) } before do + allow(user).to receive(:need_two_factor_authentication?).and_return(false) sign_in user get "/organisations/#{organisation.id}/supported-housing", headers:, params: {} end @@ -70,6 +71,7 @@ RSpec.describe OrganisationsController, type: :request do let(:search_param) { "CODE321" } before do + allow(user).to receive(:need_two_factor_authentication?).and_return(false) get "/organisations/#{organisation.id}/supported-housing?search=#{search_param}" end