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

Function TestContext

pkg/frequencyplans/context_test.go:26–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestContext(t *testing.T) {
27 a := assertions.New(t)
28
29 ctx := test.Context()
30
31 // No fallback.
32 {
33 _, ok := frequencyplans.FallbackIDFromContext(ctx)
34 a.So(ok, should.BeFalse)
35 }
36
37 ctx = frequencyplans.WithFallbackID(ctx, "EU_863_870")
38
39 // Have fallback.
40 {
41 id, ok := frequencyplans.FallbackIDFromContext(ctx)
42 a.So(ok, should.BeTrue)
43 a.So(id, should.Equal, "EU_863_870")
44 }
45}

Callers

nothing calls this directly

Calls 4

ContextFunction · 0.92
FallbackIDFromContextFunction · 0.92
WithFallbackIDFunction · 0.92
NewMethod · 0.65

Tested by

no test coverage detected