mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-15 16:14:43 +00:00
* fix(channels): persist pending history under instance names * feat(channel-memory): add run-all extraction workflow * feat(discord): resolve passive memory channel titles * feat(web): enhance passive memory controls * docs(channel-memory): document extraction endpoints --------- Co-authored-by: Collective Developer <man@collective.dev>
28 lines
788 B
Go
28 lines
788 B
Go
package channels
|
|
|
|
import "testing"
|
|
|
|
func TestSetNameSyncsPersistentHistoryChannelName(t *testing.T) {
|
|
base := NewBaseChannel(TypeDiscord, nil, nil)
|
|
history := &PendingHistory{channelName: TypeDiscord}
|
|
base.SetGroupHistory(history)
|
|
|
|
base.SetName("co-assistant-2-0")
|
|
|
|
if history.channelName != "co-assistant-2-0" {
|
|
t.Fatalf("history channelName = %q, want %q", history.channelName, "co-assistant-2-0")
|
|
}
|
|
}
|
|
|
|
func TestSetGroupHistorySyncsExistingChannelName(t *testing.T) {
|
|
base := NewBaseChannel(TypeDiscord, nil, nil)
|
|
base.SetName("co-assistant-2-0")
|
|
history := &PendingHistory{channelName: TypeDiscord}
|
|
|
|
base.SetGroupHistory(history)
|
|
|
|
if history.channelName != "co-assistant-2-0" {
|
|
t.Fatalf("history channelName = %q, want %q", history.channelName, "co-assistant-2-0")
|
|
}
|
|
}
|