mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
Don't wrap exceptions in test mode unless specifically requested.
This helps debugging reports with invalid SQL, which would otherwise return no results instead of a useful error message while running tests.
This commit is contained in:
@ -814,7 +814,7 @@ describe Report do
|
||||
end
|
||||
|
||||
it "returns a report with an exception error" do
|
||||
report = Report.find("exception_test")
|
||||
report = Report.find("exception_test", wrap_exceptions_in_test: true)
|
||||
expect(report.error).to eq(:exception)
|
||||
end
|
||||
end
|
||||
@ -853,7 +853,7 @@ describe Report do
|
||||
|
||||
Report.stubs(:new).raises(ReportInitError.new("x"))
|
||||
|
||||
report = Report.find('signups')
|
||||
report = Report.find('signups', wrap_exceptions_in_test: true)
|
||||
|
||||
expect(report).to be_nil
|
||||
|
||||
|
Reference in New Issue
Block a user