From 9f27335304fc8320d2b8fc5fb59afd7e0a67c154 Mon Sep 17 00:00:00 2001 From: Jonathan Gillespie Date: Tue, 15 Oct 2024 02:18:10 -0400 Subject: [PATCH] [WIP] --- .../classes/LoggerEngineDataSelector_Tests.cls | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nebula-logger/core/tests/logger-engine/classes/LoggerEngineDataSelector_Tests.cls b/nebula-logger/core/tests/logger-engine/classes/LoggerEngineDataSelector_Tests.cls index b4cc0be06..7419b96f1 100644 --- a/nebula-logger/core/tests/logger-engine/classes/LoggerEngineDataSelector_Tests.cls +++ b/nebula-logger/core/tests/logger-engine/classes/LoggerEngineDataSelector_Tests.cls @@ -47,7 +47,7 @@ private class LoggerEngineDataSelector_Tests { @IsTest static void it_returns_cached_auth_session_proxy_from_database() { - List sessions = [ + List queriedAuthSessions = [ SELECT Id, LoginHistory.Application, @@ -63,7 +63,9 @@ private class LoggerEngineDataSelector_Tests { FROM AuthSession WHERE UsersId = :System.UserInfo.getUserId() AND IsCurrent = TRUE ]; - LoggerSObjectProxy.AuthSession expectedAuthSessionProxy = sessions.isEmpty() ? null : new LoggerSObjectProxy.AuthSession(sessions.get(0)); + LoggerSObjectProxy.AuthSession expectedAuthSessionProxy = queriedAuthSessions.isEmpty() + ? null + : (LoggerSObjectProxy.AuthSession) System.JSON.deserialize(System.JSON.serialize(queriedAuthSessions.get(0)), LoggerSObjectProxy.AuthSession.class); System.Assert.areEqual(1, System.Limits.getQueries()); LoggerSObjectProxy.AuthSession returnedAuthSessionProxy = LoggerEngineDataSelector.getInstance().getCachedAuthSessionProxy();