Actions
Refactor #13938
closedRemove reports fixtures
Description
The fixtures for reports, logs and messages cause problems under Rails 4.2 as they are associated to fixture hosts which no longer exist (since #7733). Since their hosts were removed, the reports should also be removed and tests should use FactoryGirl instead.
On 4.2, functional and integration tests for config reports fail when rendering links to report.host, which is always nil (and for normal use we have a presence check on host_id):
1) Error: ConfigReportsControllerTest#test_index: ActionView::Template::Error: undefined method `name' for nil:NilClass app/models/report.rb:56:in `to_label' app/helpers/application_helper.rb:31:in `link_to' app/helpers/application_helper.rb:176:in `display_link_if_authorized' app/helpers/application_helper.rb:166:in `display_delete_if_authorized' app/views/config_reports/_list.html.erb:35:in `block in _app_views_config_reports__list_html_erb___4177766395673083355_151768240' app/views/config_reports/_list.html.erb:18:in `_app_views_config_reports__list_html_erb___4177766395673083355_151768240' app/views/config_reports/index.html.erb:3:in `_app_views_config_reports_index_html_erb__4196656909700471881_151739580' app/controllers/concerns/application_shared.rb:13:in `set_timezone' app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' test/functional/config_reports_controller_test.rb:8:in `test_index'
Updated by Dominic Cleal about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 141dead709ca7f99ffdc78ba6d6dca60f3d8188f.
Actions