pkordel / multisearch

Search for multiple keywords in one go
0 stars 0 forks source link

Inadequate and/or incomplete test coverage #16

Open olivierobert opened 4 years ago

olivierobert commented 4 years ago

While tests were added for requests and models, the core business logic of the domains in services are not properly tested. At the moment, there is only one example for SearchResult::Create which is incomplete and no tests for Report::Create (less critical).

https://github.com/pkordel/multisearch/blob/8b2699ffaa80e223ced6904edf79d121fbe2a0e3/spec/services/search_result/create_spec.rb#L3-L8

In the above spec, while VCR is set up, there are currently no cassettes (the below cassette was created in my local environment):

image

The goal is not to always get 100 test coverage (it's a nice and motivating goal for a team) and I also value the opinion to focus on critical tests first, but in this case the test coverage is not sufficient. Also not covering the services is not satisfying in the way that these classes are the hardest to test and you could have demonstrated your unit testing skills better 💪

pkordel commented 4 years ago

@olivierobert agreed. This was on my radar as next steps.