fix(db): transactional useMagicToken, O(2) getSession, ?? for displayName
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,14 +43,10 @@ describe('profiles', () => {
|
||||
|
||||
test('updateProfileSeen updates last_seen timestamp', () => {
|
||||
const created = db.createProfile('seen@example.com', 'Seen')
|
||||
const before = created.last_seen
|
||||
// Ensure time advances by at least 1ms
|
||||
const laterTime = before + 1
|
||||
// Use a small delay approach: manipulate via direct SQL isn't needed,
|
||||
// just call updateProfileSeen and verify last_seen >= original
|
||||
const callTime = Date.now()
|
||||
db.updateProfileSeen(created.id)
|
||||
const updated = db.findProfileById(created.id)
|
||||
assert.ok(updated.last_seen >= before)
|
||||
assert.ok(updated.last_seen >= callTime)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user