mirror of
https://github.com/chatmail/core.git
synced 2026-10-01 18:50:39 +03:00
test: Assert log warnings and errors (#8457)
Adds `assert_warn`, `assert_error` and `assert_warns_or_errors` methods to `TestContext`, that let us assert that a certain warning or error is logged during the test. Also asserts test logs should not contain any other errors or warnings. Adjusts tests accordingly. Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
@@ -99,6 +99,8 @@ async fn test_housekeeping_db_closed() {
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
t.assert_warns_or_errors(&["no SQL connection"]).await;
|
||||
}
|
||||
|
||||
/// Regression test for a bug where housekeeping deleted drafts since their
|
||||
|
||||
Reference in New Issue
Block a user