preaction / Yancy

The Best Web Framework Deserves the Best Content Management System
http://preaction.me/yancy/
Other
54 stars 21 forks source link

Unify backend tests #57

Closed mohawk2 closed 5 years ago

mohawk2 commented 5 years ago

This makes changes to t/backend/*.t:

One benefit is that it will be easier to do TDD on the backend[s], which as you know is my current direction!

mohawk2 commented 5 years ago

The tests now pass, except the obvious one. I had to make a couple of tweaks to the share/run_backend_tests.pl too, which I've now got working locally on all DBs. Your thoughts welcome!

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 99.358% when pulling 209243579aa4f943b3eea062679e73df538419f5 on mohawk2:unify-backend-tests into b22cf12d52679d190f8a26f1a9795dc5b7fc6db1 on preaction:master.

preaction commented 5 years ago

After rebasing to get #58 in, the tests pass, so I'm merging this.

We may, in the future, want/need to change normalize to separate input/output functions. The internal Yancy booleans, in my opinion, should be the Mojo::JSON true/false (but that's a backcompat break we'd have to do for v2 or something). And I'm almost certain there is going to be something we'll need to store differently between different databases (geometry / geolocation systems come to mind). But we can cross that bridge when we come to it.

mohawk2 commented 5 years ago

Yes, agreed. I did consider normalize_in and _out, but thought they could stay the same for now.