test(notification): complete platform values and read watch output as NDJSON

A table test covers the completions of alias, config, auth and notification commands, including notification IDs from the inbox. The integration test reads tea notification watch --json as one object per line, and notification feedback, watch lines and completions name a subject the same way.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-11 23:50:46 +02:00
1 parent 6c124fc998
commit 9e74ec54ad
3 files changed
+45 -11

No files matched your search

+3 -2
View File
@@ -293,8 +293,9 @@ func TestGiteaMetadataLifecycle(t *testing.T) {
require.False(t, notification.Pinned)
require.NoError(t, json.Unmarshal(scoped("notification", "mark-unread", notificationID), &notification))
require.True(t, notification.Unread)
require.NoError(t, json.Unmarshal(scoped("notification", "watch", "--timeout", "500ms", "--interval", "100ms"), &notifications))
require.NotEmpty(t, notifications)
watched := json.NewDecoder(bytes.NewReader(scoped("notification", "watch", "--timeout", "500ms", "--interval", "100ms")))
require.NoError(t, watched.Decode(&notification), "watch prints one object per line")
require.Equal(t, repo.FullName, notification.Repository)
scoped("notification", "mark-read", "--all")
require.Equal(t, "[]\n", string(scoped("notification", "list")))
var release services.Release