DEV: Use FakeLogger in RequestTracker specs (#16640)

`TestLogger` was responsible for some flaky specs runs:

```
Error during failsafe response: undefined method `debug' for #<TestLogger:0x0000556c4b942cf0 @warnings=1>
Did you mean?  debugger
```

This commit also cleans up other uses of `FakeLogger`
This commit is contained in:
Jarek Radosz
2022-05-05 03:53:54 +02:00
committed by GitHub
parent 749e496a2c
commit 3f0e767106
10 changed files with 30 additions and 56 deletions

View File

@ -91,11 +91,11 @@ describe DiscourseHub do
DiscourseHub.collection_action(:get, '/test')
expect(Rails.logger.warnings).to eq([
expect(@fake_logger.warnings).to eq([
DiscourseHub.response_status_log_message('/test', 500),
])
expect(Rails.logger.errors).to eq([
expect(@fake_logger.errors).to eq([
DiscourseHub.response_body_log_message("")
])
end