mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Portal: Add cluster admin UI #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
21
internal/api/websocket_topics_test.go
Normal file
21
internal/api/websocket_topics_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAppendWebsocketTopics(t *testing.T) {
|
||||
original := append([]string(nil), WebsocketTopics...)
|
||||
|
||||
t.Cleanup(func() {
|
||||
WebsocketTopics = original
|
||||
})
|
||||
|
||||
AppendWebsocketTopics("audit.log.*", "custom.topic")
|
||||
|
||||
require.Len(t, WebsocketTopics, len(original)+2)
|
||||
require.Contains(t, WebsocketTopics, "audit.log.*")
|
||||
require.Contains(t, WebsocketTopics, "custom.topic")
|
||||
}
|
||||
Reference in New Issue
Block a user