Skip to content
Snippets Groups Projects
Commit eda14acc authored by Cam Saul's avatar Cam Saul
Browse files

Test fixes [ci drivers]

parent 4da21522
Branches
Tags
No related merge requests found
......@@ -12,11 +12,12 @@
(testing "If font regsitration fails, we should an Exception with a useful error message"
(with-redefs [png/register-font! (fn [& _]
(throw (ex-info "Oops!" {})))]
(let [messages (mt/with-log-messages
(is (thrown-with-msg?
clojure.lang.ExceptionInfo
#"Error registering fonts: Metabase will not be able to send Pulses"
(#'png/register-fonts!))))]
(let [messages (mt/with-log-level :error
(mt/with-log-messages
(is (thrown-with-msg?
clojure.lang.ExceptionInfo
#"Error registering fonts: Metabase will not be able to send Pulses"
(#'png/register-fonts!)))))]
(testing "Should log the Exception"
(is (schema= [(s/one (s/eq :error) "log type")
(s/one Throwable "exception")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment