package stalwart import ( "context" "testing" ) func TestClientDisabledCreateDomain(t *testing.T) { c := NewClient(Config{Enabled: false}) d, err := c.CreateDomain(context.Background(), "example.com") if err != nil { t.Fatal(err) } if d.Name != "example.com" { t.Fatalf("expected example.com, got %q", d.Name) } } func TestClientDisabledCreateAccount(t *testing.T) { c := NewClient(Config{Enabled: false}) a, err := c.CreateAccount(context.Background(), "local-example.com", "alice", "secret", 1024) if err != nil { t.Fatal(err) } if a.ID == "" { t.Fatal("expected local account id") } }