MCPcopy
hub / github.com/jackc/pgx / TestJSONUnmarshalAuthenticationGSS

Function TestJSONUnmarshalAuthenticationGSS

pgproto3/json_test.go:40–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestJSONUnmarshalAuthenticationGSS(t *testing.T) {
41 data := []byte(`{"Type":"AuthenticationGSS"}`)
42 want := AuthenticationGSS{}
43
44 var got AuthenticationGSS
45 if err := json.Unmarshal(data, &got); err != nil {
46 t.Errorf("cannot JSON unmarshal %v", err)
47 }
48 if !reflect.DeepEqual(got, want) {
49 t.Error("unmarshaled AuthenticationGSS struct doesn't match expected value")
50 }
51}
52
53func TestJSONUnmarshalAuthenticationGSSContinue(t *testing.T) {
54 data := []byte(`{"Type":"AuthenticationGSSContinue","Data":[1,2,3,4]}`)

Callers

nothing calls this directly

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected