dotandimet / Mojo-Feed

Mojo::DOM based Feed Parser
Other
4 stars 1 forks source link

Adding a feed-generate capability - test to_hash method #20

Closed mohawk2 closed 4 years ago

mohawk2 commented 4 years ago

This is the start of the work discussed on IRC earlier. Before I started that, I thought it valuable to test what is already there, since there weren't any tests of the to_hash method currently. The Test::Deep is to be able to ignore the guid key, because there is no way to supply one to an Atom feed.

Arguably the guid should go away, since it is adequately represented by the id?

dotandimet commented 4 years ago

Cool! to_hash is actually tested indirectly in the "old plugin version compatibility" test file: https://github.com/dotandimet/Mojo-Feed/blob/master/t/24-plugin.t Maybe we can extend this to test possible mutations via the attribute accessors (this will help shake out where we need to add error handling).