MCPcopy Create free account
hub / github.com/stretchr/objx / TestMapFromBase64String

Function TestMapFromBase64String

map_test.go:148–155  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

146}
147
148func TestMapFromBase64String(t *testing.T) {
149 base64String := "eyJuYW1lIjoiTWF0In0="
150 o, err := objx.FromBase64(base64String)
151
152 require.NoError(t, err)
153 assert.Equal(t, o.Get("name").Str(), "Mat")
154 assert.Equal(t, objx.MustFromBase64(base64String).Get("name").Str(), "Mat")
155}
156
157func TestMapFromBase64StringWithError(t *testing.T) {
158 base64String := "eyJuYW1lIjoiTWFasd0In0="

Callers

nothing calls this directly

Calls 6

FromBase64Function · 0.92
MustFromBase64Function · 0.92
StrMethod · 0.80
GetMethod · 0.80
NoErrorMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…