Skip to content

Commit

Permalink
feat: update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Goel <[email protected]>
  • Loading branch information
grvgoel81 authored and Gaurav Goel committed Sep 23, 2024
1 parent eb88acb commit 51eb14d
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SessionManagerTest {
json.put("publicAddress", "0x93475c78dv0jt80f2b6715a5c53838eC4aC96EF7")
val sessionKey = sessionManager.createSession(
json.toString(),
context, true
context
).get()
assert(sessionKey != null)
}
Expand All @@ -45,10 +45,11 @@ class SessionManagerTest {
"91714924788458331086143283967892938475657483928374623640418082526960471979197446884"
)
json.put("publicAddress", "0x93475c78dv0jt80f2b6715a5c53838eC4aC96EF7")
sessionManager.createSession(
val sessionId = sessionManager.createSession(
json.toString(),
context, true
context
).get()
sessionManager.saveSessionId(sessionId)
sessionManager = SessionManager(context, 86400, "*")
val authResponse = sessionManager.authorizeSession(
context.packageName,
Expand All @@ -70,10 +71,11 @@ class SessionManagerTest {
"91714924788458331086143283967892938475657483928374623640418082526960471979197446884"
)
json.put("publicAddress", "0x93475c78dv0jt80f2b6715a5c53838eC4aC96EF7")
sessionManager.createSession(
val sessionId = sessionManager.createSession(
json.toString(),
context, true
context
).get()
sessionManager.saveSessionId(sessionId)
sessionManager = SessionManager(context, 86400, context.packageName)
val invalidateRes = sessionManager.invalidateSession(context).get()
assertEquals(invalidateRes, true)
Expand Down

0 comments on commit 51eb14d

Please sign in to comment.