Browse Source

Fix event manager test

plugins
Sarah Jamie Lewis 2 months ago
parent
commit
4334d3ff3f
  1. 3
      event/eventmanager_test.go

3
event/eventmanager_test.go

@ -11,12 +11,11 @@ func TestEventManager(t *testing.T) {
eventManager := NewEventManager()
// We need to make this buffer at least 1, otherwise we will log an error!
testChan := make(chan Event, 1)
simpleQueue := NewQueue()
eventManager.Subscribe("TEST", simpleQueue)
eventManager.Publish(Event{EventType: "TEST", Data: map[Field]string{"Value": "Hello World"}})
event := <-testChan
event := simpleQueue.Next()
if event.EventType == "TEST" && event.Data["Value"] == "Hello World" {
} else {

Loading…
Cancel
Save