We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6018a29 commit 542edfaCopy full SHA for 542edfa
rss/parser_test.go
@@ -30,6 +30,15 @@ func TestParser_Parse(t *testing.T) {
30
fp := &rss.Parser{}
31
actual, _ := fp.Parse(bytes.NewReader(f), gofeed.NewParser().BuildRSSExtParsers())
32
33
+ // the `Parsed` part of extensions is not correctly unmarshalled from JSON
34
+ // workaround: move the actual extensions through a round of json marshalling so that we get the same
35
+ for _, i := range actual.Items {
36
+ if len(i.Extensions) > 0 {
37
+ b, _ := json.Marshal(i.Extensions)
38
+ json.Unmarshal(b, &i.Extensions)
39
+ }
40
41
+
42
// Get json encoded expected feed result
43
ef := fmt.Sprintf("../testdata/parser/rss/%s.json", name)
44
e, _ := ioutil.ReadFile(ef)
0 commit comments