mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix(notification): word --all confirmations and flag values clearly
notification mark-read --all asked "Marked as read all … ?"; each command now asks in its own words, such as "Pin all unread notifications in your inbox?". The status and type filters list their values in help, the api parameter flags read like gh's, and tea auth login --help aligns its method list. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
4 files changed
+22
-16
No files matched your search
@@ -132,6 +132,11 @@ func TestNotificationMutationsReportWhatChanged(t *testing.T) {
|
||||
require.Equal(t, tc.want, withoutANSI(diagnostics.String()), tc.args)
|
||||
}
|
||||
require.Equal(t, []string{"pinned", "read", "read", "all read"}, marks)
|
||||
prompt := &scriptedPrompter{accept: true}
|
||||
deps.Prompter, deps.Streams.InTTY, deps.Streams.ErrTTY = prompt, true, true
|
||||
require.NoError(t, Execute(context.Background(), deps, []string{"notification", "pin", "--all"}))
|
||||
require.Equal(t, []string{"Pin all unread notifications in your inbox?"}, prompt.confirmations)
|
||||
deps.Streams.InTTY, deps.Streams.ErrTTY = false, false
|
||||
marks = nil
|
||||
out.Reset()
|
||||
require.NoError(t, Execute(context.Background(), deps, []string{"notification", "view", "12"}))
|
||||
|
||||
Reference in new issue
Block a user