navidrome/server/events/events_test.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
368 B
Go
Raw Normal View History

2021-02-04 18:43:46 +01:00
package events
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Event", func() {
It("marshals Event to JSON", func() {
testEvent := TestEvent{Test: "some data"}
json := testEvent.Prepare(&testEvent)
Expect(json).To(Equal(`{"name":"testEvent","Test":"some data"}`))
})
})
type TestEvent struct {
baseEvent
Test string
}