Skip to content

Commit

Permalink
[WIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
jongpie committed Oct 15, 2024
1 parent 056a0d5 commit 9f27335
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private class LoggerEngineDataSelector_Tests {

@IsTest
static void it_returns_cached_auth_session_proxy_from_database() {
List<Schema.AuthSession> sessions = [
List<Schema.AuthSession> queriedAuthSessions = [
SELECT
Id,
LoginHistory.Application,
Expand All @@ -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();
Expand Down

0 comments on commit 9f27335

Please sign in to comment.