From 1101ae25fc23f8459e00db08f879a8d43d393a72 Mon Sep 17 00:00:00 2001 From: JG Date: Fri, 20 May 2022 06:46:00 +0100 Subject: [PATCH] pulled out of support person context, this should work for any user in dev env --- spec/models/user_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 2f6fc824d..f22fea7ae 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -139,15 +139,15 @@ RSpec.describe User, type: :model do it "can filter case logs by user, year, status and organisation" do expect(user.case_logs_filters).to eq(%w[status years user organisation]) end + end - context "when the user is in development environment" do - before do - allow(Rails.env).to receive(:development?).and_return(true) - end + context "when the user is in development environment" do + before do + allow(Rails.env).to receive(:development?).and_return(true) + end - it "doesn't require 2FA" do - expect(user.need_two_factor_authentication?(nil)).to be false - end + it "doesn't require 2FA" do + expect(user.need_two_factor_authentication?(nil)).to be false end end end