inital commit

This commit is contained in:
2026-05-26 20:21:55 +02:00
parent 965f9d6ad4
commit 0ae20aa68d
21 changed files with 651 additions and 111 deletions

View File

@@ -76,7 +76,7 @@ func TestNotifications_ResolvesAvatars(t *testing.T) {
defer srv.Close()
client := newE2EClient(t, srv)
n, err := client.Notifications(context.Background(), WithResolvedAvatars(0))
n, err := client.Notifications(context.Background(), NotificationsOptions{ResolveAvatars: true})
if err != nil {
t.Fatalf("Notifications: %v", err)
}
@@ -133,7 +133,7 @@ func TestNotifications_ResolvedAvatarsRespectsLimit(t *testing.T) {
client := newE2EClient(t, srv)
// Budget of 2 distinct authors. Journals resolve in document order, so
// authora + authorb get fetched; authorc is past the budget.
n, err := client.Notifications(context.Background(), WithResolvedAvatars(2))
n, err := client.Notifications(context.Background(), NotificationsOptions{ResolveAvatars: true, AvatarLimit: 2})
if err != nil {
t.Fatalf("Notifications: %v", err)
}
@@ -178,7 +178,7 @@ func TestNotifications_NoAvatarResolutionByDefault(t *testing.T) {
defer srv.Close()
client := newE2EClient(t, srv)
n, err := client.Notifications(context.Background())
n, err := client.Notifications(context.Background(), NotificationsOptions{})
if err != nil {
t.Fatalf("Notifications: %v", err)
}