test: cover the chat access policy and bootstrap guards
ChatAccess admits only chat-group members to context bm/1 and manages nothing; the chat context oversees nothing and its loader knows only id 1; /chat and /chat/members need a caller and a database. The migration count rises to 15 for the chat group seed.
This commit is contained in:
@@ -77,8 +77,8 @@ func TestPluginActivates(t *testing.T) {
|
||||
if n := len(p.Models()); n != 11 {
|
||||
t.Errorf("Models = %d, want 11", n)
|
||||
}
|
||||
if n := len(p.Migrations()); n != 14 {
|
||||
t.Errorf("Migrations = %d, want 14", n)
|
||||
if n := len(p.Migrations()); n != 15 {
|
||||
t.Errorf("Migrations = %d, want 15", n)
|
||||
}
|
||||
if !slices.ContainsFunc(p.Commands(), func(c bonfire.Command) bool { return c.Name == "bm:seed" }) {
|
||||
t.Error("bm:seed is not registered")
|
||||
|
||||
Reference in New Issue
Block a user