Skip to content

Commit 9073062

Browse files
committed
fixup! coderd/database: only generate ID at database side, order messages by created_at instead of id
1 parent d784f8e commit 9073062

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5341,7 +5341,8 @@ func (s *MethodTestSuite) TestChat() {
53415341
s.Run("GetChatsByOwnerID", s.Subtest(func(db database.Store, check *expects) {
53425342
u1, u1c1, _ := createChat(s.T(), db)
53435343
u1c2 := dbgen.Chat(s.T(), db, database.Chat{
5344-
OwnerID: u1.ID,
5344+
OwnerID: u1.ID,
5345+
CreatedAt: u1c1.CreatedAt.Add(time.Hour),
53455346
})
53465347
_, _, _ = createChat(s.T(), db) // other user's chat
53475348
check.Args(u1.ID).Asserts(u1c2, policy.ActionRead, u1c1, policy.ActionRead).Returns([]database.Chat{u1c2, u1c1})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy