V0.7.0 shell contract (#54)
All checks were successful
All checks were successful
This commit was merged in pull request #54.
This commit is contained in:
@@ -236,3 +236,29 @@ func TestToolResultRouteBoth(t *testing.T) {
|
||||
t.Error("tool.result.* should route DirBoth (filtered by WS subscriber, not routing table)")
|
||||
}
|
||||
}
|
||||
|
||||
func TestShellContractEventRoutes(t *testing.T) {
|
||||
// package.changed — broadcast to all clients
|
||||
if !ShouldSendToClient("package.changed") {
|
||||
t.Error("package.changed should be sent to client")
|
||||
}
|
||||
if ShouldAcceptFromClient("package.changed") {
|
||||
t.Error("package.changed should NOT be accepted from client")
|
||||
}
|
||||
|
||||
// auth.changed — targeted to specific user
|
||||
if !ShouldSendToClient("auth.changed") {
|
||||
t.Error("auth.changed should be sent to client")
|
||||
}
|
||||
if ShouldAcceptFromClient("auth.changed") {
|
||||
t.Error("auth.changed should NOT be accepted from client")
|
||||
}
|
||||
|
||||
// notification.all_read — targeted to specific user
|
||||
if !ShouldSendToClient("notification.all_read") {
|
||||
t.Error("notification.all_read should be sent to client")
|
||||
}
|
||||
if ShouldAcceptFromClient("notification.all_read") {
|
||||
t.Error("notification.all_read should NOT be accepted from client")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user