I'm curious what people consider adequate/thorough testing of routes. A guy I work with seems to want to assert every route in our routes file, no matter how standard. I feel like this is a waste of time, but maybe I'm wrong and there is some value to this I'm unaware of.
There are a few cases where I can see some value in routing. We still have a couple actions that respond to both GET and POST requests, although I've been meaning to get rid of those. We don't have any kind of crazy constraints with lambdas or anything, but that seems like it would be worth testing if we did.
But for a normal resources definition?
resources :foo, only: [:index, :show]
We have assertions that both of these routes exist, we assert that they're GET and that they go to the correct controller/action. Is there any point to any of that? It feels like we're just testing Rails at this point.
On a slightly related question, I prefer to have resource routes defined like the one above (with the only: [:index, :show]
part). Are there any consequence to only defining resources :foo
in the routes file if there are only index/show actions on that controller?
It seems to me that it's probably just using more time and/or memory, but is it somehow also a security concern or something really bad that I'm unaware of?