diff --git a/rss/parser_test.go b/rss/parser_test.go index 3953e7b7..01af7fbe 100644 --- a/rss/parser_test.go +++ b/rss/parser_test.go @@ -30,6 +30,15 @@ func TestParser_Parse(t *testing.T) { fp := &rss.Parser{} actual, _ := fp.Parse(bytes.NewReader(f), gofeed.NewParser().BuildRSSExtParsers()) + // the `Parsed` part of extensions is not correctly unmarshalled from JSON + // workaround: move the actual extensions through a round of json marshalling so that we get the same + for _, i := range actual.Items { + if len(i.Extensions) > 0 { + b, _ := json.Marshal(i.Extensions) + json.Unmarshal(b, &i.Extensions) + } + } + // Get json encoded expected feed result ef := fmt.Sprintf("../testdata/parser/rss/%s.json", name) e, _ := os.ReadFile(ef)