mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
parent
cb6aa49439
commit
7f85ecd515
14 changed files with 110 additions and 41 deletions
|
@ -8,8 +8,10 @@ import (
|
|||
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"}`))
|
||||
data := testEvent.Data(&testEvent)
|
||||
Expect(data).To(Equal(`{"Test":"some data"}`))
|
||||
name := testEvent.Name(&testEvent)
|
||||
Expect(name).To(Equal("testEvent"))
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue