123456789101112131415161718192021 |
- package borealis
- import (
- "encoding/json"
- "testing"
- )
- const (
- expectedEventJSON = `{"type":"1","sequential_id":2,"timestamp":"2009-01-03T20:15:08.004+02:00","unique_id":"Z5ZWs1U9RoGQVugoz5SIrkmkj9T","payload":{}}`
- )
- func TestEncodeEventJSON(t *testing.T) {
- output, err := json.Marshal(expectedEvent)
- if err != nil {
- t.Error(err)
- }
- actual := string(output)
- if actual != expectedEventJSON {
- t.Errorf("expected %v, but got %v", expectedRawEventJSON, actual)
- }
- }
|