Deprecate usage of assigns and render_template in our controller tests
Rails 5 removes
assert_template from its core and we have to include
rails-controller-testing gem to migrate to Rails 5 (!5555 (closed)). The motivations provided in http://blog.bigbinary.com/2016/04/19/changes-to-test-controllers-in-rails-5.html are following: (copy-paste)
Reasons for removing assigns and assert_template
The idea behind the removal of these methods is that instance variables and which template is rendered in a controller action are internals of a controller, and controller tests should not care about them.
According to Rails team, controller tests should be more concerned about what is the result of that controller action like what cookies are set, or what HTTP code is set rather than testing of the internals of the controller. So, these methods are removed from the core.
render_template in our controller specs. Include a section in https://docs.gitlab.com/ce/development/testing.html that asks people not to use them in new tests.