baranovskypd / goodpress

WIP!! :warning: R Package to Write Posts from R Markdown to Wordpress :warning:
https://maelle.github.io/goodpress/
Other
34 stars 5 forks source link

Improve testing #6

Open maelle opened 4 years ago

maelle commented 4 years ago

7 adds one test, with no auth required thanks to vcr + my trick from rredlist tests.

Now,

maelle commented 4 years ago

@daveparr I'd be curious to hear your thoughts, I see that at the moment you don't test the new post content either in dev.to.ol. :slightly_smiling_face:

DaveParr commented 4 years ago

Not yet, but that's basically just due to lazyness with side-projects 😛

I will in the nearish future, on the face of it I haven't spotted a reason I can't with my current workflow and vcr recording methods. Have you spotted a problem I haven't?

maelle commented 4 years ago

No I haven't spotted any problem but I was wondering how "unit" our unit tests are if we only test that the API returns no error, e.g. should we test the post that the website has is correct somehow.

It might be useless!

DaveParr commented 4 years ago

So in my case, I get in the response body a json string in that string (after parsing I think), I get an item called body_html which contains what I understand to be the html that will displayed by dev.to. I was at least just initially planning on checking that it was there and not empty :)

maelle commented 1 year ago

For reference on testing https://books.ropensci.org/http-testing/

DaveParr commented 1 year ago

@maelle Looks like a great resource!