feat: add 5 experiment

This commit is contained in:
TAskMAster339
2026-10-10 21:32:33 +03:00
parent 6892af8842
commit 715f6c4175
1397 changed files with 271651 additions and 56 deletions
-10
View File
@@ -2,22 +2,12 @@ package tests
import (
"context"
"messenger/src/backend/services"
"testing"
"time"
"github.com/google/uuid"
)
func TestMessageLessUsesIDForEqualTimestamps(t *testing.T) {
createdAt := time.Date(2026, 9, 18, 12, 0, 0, 0, time.UTC)
first := Message{ID: "a", CreatedAt: createdAt}
second := Message{ID: "b", CreatedAt: createdAt}
if !services.MessageLess(first, second) || services.MessageLess(second, first) {
t.Fatal("equal timestamps must be ordered by ID")
}
}
func TestListPageByChatUsesCursorAndLimit(t *testing.T) {
f := newTestFixture(t)
user, _ := createTestUser(t, f.users, "alice", "Алиса")
-1
View File
@@ -7,6 +7,5 @@ import (
type User = repositories.User
type Chat = repositories.Chat
type Message = repositories.Message
type messagePage = services.MessagePage
type messageCursor = repositories.MessageCursor