aboutsummaryrefslogtreecommitdiff
path: root/roomserver/storage/shared/storage_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'roomserver/storage/shared/storage_test.go')
-rw-r--r--roomserver/storage/shared/storage_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/roomserver/storage/shared/storage_test.go b/roomserver/storage/shared/storage_test.go
index 581d83ee..c7b915c7 100644
--- a/roomserver/storage/shared/storage_test.go
+++ b/roomserver/storage/shared/storage_test.go
@@ -163,12 +163,17 @@ func TestUserRoomKeys(t *testing.T) {
gotKey, err = db.SelectUserRoomPrivateKey(context.Background(), *userID, *roomID)
assert.NoError(t, err)
assert.Equal(t, key, gotKey)
+ pubKey, err := db.SelectUserRoomPublicKey(context.Background(), *userID, *roomID)
+ assert.NoError(t, err)
+ assert.Equal(t, key.Public(), pubKey)
// Key doesn't exist, we shouldn't get anything back
- assert.NoError(t, err)
gotKey, err = db.SelectUserRoomPrivateKey(context.Background(), *userID, *doesNotExist)
assert.NoError(t, err)
assert.Nil(t, gotKey)
+ pubKey, err = db.SelectUserRoomPublicKey(context.Background(), *userID, *doesNotExist)
+ assert.NoError(t, err)
+ assert.Nil(t, pubKey)
queryUserIDs := map[spec.RoomID][]ed25519.PublicKey{
*roomID: {key.Public().(ed25519.PublicKey)},