]> git.giacomolli.uk - onechat/blobdiff - command_test.go
Share general review and documentation rules
[onechat] / command_test.go
index 73539c0be1183d88a5993c2b035efccc7dc298c2..a28a2a2fcecf9b1402bc853e8f28339e5fe43468 100644 (file)
@@ -28,9 +28,13 @@ func TestHelpListsTheImportTargetFlag(t *testing.T) {
        require.Contains(t, help, "--agent NAME           import into an existing direct child (default: root)")
 }
 
-func TestHelpListsTheRootNotificationCommand(t *testing.T) {
-       require.Contains(t, commandOutput(t, "help"), "notify --source SOURCE --id ID --text TEXT")
-       require.Contains(t, commandOutput(t, "notify", "--help"), "not processed")
+func TestHelpListsTheStableNotificationTargetFlag(t *testing.T) {
+       require.Contains(t, commandOutput(t, "help"), "notify [--agent-id ID] --source SOURCE --id ID --text TEXT")
+
+       help := commandOutput(t, "notify", "--help")
+       require.Contains(t, help, "not processed")
+       require.Contains(t, help, "--agent-id ID")
+       require.NotContains(t, help, "--agent NAME")
 }
 
 func commandOutput(t *testing.T, args ...string) string {