MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / TestDefinitions

Function TestDefinitions

pkg/events/definitions_test.go:27–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25)
26
27func TestDefinitions(t *testing.T) {
28 t.Parallel()
29 a := assertions.New(t)
30 testEvent := events.Define("test", "Test Event", events.WithVisibility(ttnpb.Right_RIGHT_ALL))
31 evt := testEvent.New(test.Context())
32 a.So(evt.Name(), should.Equal, "test")
33 a.So(evt.Visibility().Rights, should.Contain, ttnpb.Right_RIGHT_ALL)
34}

Callers

nothing calls this directly

Calls 6

DefineFunction · 0.92
WithVisibilityFunction · 0.92
ContextFunction · 0.92
NewMethod · 0.65
NameMethod · 0.65
VisibilityMethod · 0.65

Tested by

no test coverage detected