DEV: Drop TrackingLogger for FakeLogger (#16642)

This commit is contained in:
Jarek Radosz
2022-05-05 03:50:43 +02:00
committed by GitHub
parent 8442a07c13
commit fb1a3a1dbb
5 changed files with 28 additions and 35 deletions

View File

@@ -85,10 +85,10 @@ describe UserDestroyer do
context 'context is missing' do
it "logs warning message if context is missing" do
messages = track_log_messages(level: Logger::WARN) do
logger = track_log_messages do
UserDestroyer.new(admin).destroy(user)
end
expect(messages[0][2]).to include("User destroyed without context from:")
expect(logger.warnings).to include(/User destroyed without context from:/)
end
end