(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestErrorMarshalUnmarshal(t *testing.T) { |
| 11 | t.Parallel() |
| 12 | |
| 13 | expected := []byte(`{"id":"1","links":{"about":"A","type":"TY"},"status":"500","code":"C","title":"T","detail":"D","source":{"pointer":"PO","parameter":"PA","header":"H"},"meta":{"K":"V"}}`) |
| 14 | |
| 15 | var e Error |
| 16 | err := json.Unmarshal(expected, &e) |
| 17 | is.MustNoError(t, err) |
| 18 | |
| 19 | actual, err := json.Marshal(&e) |
| 20 | is.MustNoError(t, err) |
| 21 | is.EqualJSON(t, string(expected), string(actual)) |
| 22 | } |
nothing calls this directly
no test coverage detected