]> git.giacomolli.uk - onechat/blobdiff - command_test.go
Bind external events to permanent agent IDs
[onechat] / command_test.go
index 3d89327078432ad9bd5f3075226ddb83eb51de7e..73539c0be1183d88a5993c2b035efccc7dc298c2 100644 (file)
@@ -22,6 +22,17 @@ func TestHelpListsVersionCommand(t *testing.T) {
        require.Contains(t, commandOutput(t, "help"), "  version                  show the build version\n")
 }
 
+func TestHelpListsTheImportTargetFlag(t *testing.T) {
+       help := commandOutput(t, "help")
+       require.Contains(t, help, "import [-n] [--agent NAME] ZIP...")
+       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 commandOutput(t *testing.T, args ...string) string {
        t.Helper()