Skip to content

Business intelligence made simple

Added test for check error [skip ci]

Andrew Kaneef5514c281ca
diff --git a/test/checks_test.rb b/test/checks_test.rb
index 76fc5a70..37a8ea2f 100644
--- a/test/checks_test.rb
+++ b/test/checks_test.rb
@@ -41,6 +41,14 @@ class ChecksTest < ActionDispatch::IntegrationTest
assert_equal "failing", check.state
end
+ def test_error
+ query = create_query(statement: "invalid")
+ check = create_check(query: query, check_type: "bad_data")
+ Blazer.run_checks(schedule: "5 minutes")
+ check.reload
+ assert_equal "error", check.state
+ end
+
def test_anomaly_prophet
skip unless ENV["TEST_PROPHET"]