ioki-mobility / ioki-ruby

Ruby Client for ioki APIs
MIT License
7 stars 0 forks source link

Refactor api specs #18

Open ans-ioki opened 2 years ago

ans-ioki commented 2 years ago

I keep coming back to how platform_api_spec.rb and passenger_api_spec.rb look and how they slowed me down during the Endpoint refactoring. It's just too much repetition for my taste. Too many tests for the same path, the same structure. I keep thinking we could generate the tests from the defined endpoints, but if we generate it it doesn't make sense to have the tests. I think we want to have a table of Endpoint -> Request, something like a bin/rails routes and compare that with the API instead of testing everything manually. I think what we want is to answer the question: "What can the client do and how does it compare to what the API can do?" and I think and the current way is not the best.

A5308Y commented 2 years ago

"me" = me in this ticket.