Project

General

Profile

« Previous | Next » 

Revision d0732ecf

Added by Dominic Cleal about 8 years ago

fixes #13941 - expect deprecation warnings in tests

When testing deprecated routes, parameters etc, expect the deprecation
warnings to both test that it's logged and to prevent the logging from
cluttering test output.

View differences:

test/functional/api/v1/reports_controller_test.rb
class Api::V1::ReportsControllerTest < ActionController::TestCase
include ::ReportHostPermissionsTest
setup do
Foreman::Deprecation.expects(:api_deprecation_warning).with('Reports were renamed to ConfigReports')
end
test "should get index" do
FactoryGirl.create(:report)
get :index, { }

Also available in: Unified diff