In functional tests, the environment seems to be more stringent than in production or development.
In the last two cases, he cannot βknowβ the parameter names in advance, since they are determined by defining the corresponding / associated route.
In the test , however, the parameter name is explicitly specified. This allows the environment to be more picky.
Since this behavior deviates from the principle of the maximum possible compliance prov-env test-env, I consider it a mistake and filed accordingly ( https://github.com/rails/journey/issues/59 ).
To solve the problem , make sure that your parameter names exactly match your routes.
I suggest adding the appropriate routes until the issue of the problem is resolved. Thus, if this caused an error and resolved, you just need to delete the routes again - instead of messing with your production logic at the controller level (which works flawlessly already).
user569825
source share