uclibs / ucrate

Scholar@UC: University of Cincinnati's self-submission institutional repository
https://scholar.uc.edu
Other
5 stars 3 forks source link

1135/ HUT Include Devise::Test::ControllerHelpers for all types in rails_helper #1149

Closed Janell-Huyck closed 6 months ago

Janell-Huyck commented 6 months ago

Fixes #1135

Include Devise::Test::ControllerHelpers for all types in rails_helper.

The following testing error:

Failure/Error: <%= media_display https://github.com/presenter %>

ActionView::Template::Error:

came from not correctly loading the testing helpers from Devise. We had

  config.include Devise::Test::ControllerHelpers, type: :controller
  config.include Devise::Test::ControllerHelpers, type: :helper

in our rails_helper file, but we also needed:

  config.include Devise::Test::ControllerHelpers, type: :view

This PR combines the three types and loads all types by simplifying the loading to:

  config.include Devise::Test::ControllerHelpers