mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-08 07:11:06 +00:00
22 lines
375 B
Go
22 lines
375 B
Go
package core
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestBuildChatSession(t *testing.T) {
|
|
chat := &Chat{
|
|
Context: "test context",
|
|
Pattern: "test pattern",
|
|
Message: "test message",
|
|
}
|
|
session, err := chat.BuildChatSession(false)
|
|
if err != nil {
|
|
t.Fatalf("BuildChatSession() error = %v", err)
|
|
}
|
|
|
|
if session == nil {
|
|
t.Fatalf("BuildChatSession() returned nil session")
|
|
}
|
|
}
|