million-views / praas

Proxy as a service.
MIT License
4 stars 2 forks source link

crud-server, test: refactor tests by code functionality #159

Closed shinenelson closed 4 years ago

shinenelson commented 4 years ago

the REST API test suite has been made smart to cover as many lines of code testing all the functionality without the need for extensive and exhaustive tests for every field in the request.

this refactor was driven by code coverage. focus was put into covering as many lines of code in a single test eliminating the need for more tests that would make redundant calls to the same lines of code. test code coverage has been maintained to be exactly the same before and after the refactor.

tests for optional fields in the model ( status, throttle, description, hiddenFormField ) have been removed from the REST API test suite because they are already being tested exhaustively in the model tests. also, there are no references to specific code that checks for these fields specifically. they are checked by the model and I believe that the tests for those checks should be in the model tests ( as they already are ).

closes #158

m5nv commented 4 years ago

@shinenelson please sync with master so I can review in that context. Headed in the right direction but I think it needs more work. Will get more specific once I see the master merged in.

shinenelson commented 4 years ago

I've resolved the conflicts in 9e351d5