diff --git a/test/internal/config/blazer.yml b/test/internal/config/blazer.yml index c5d2dfeb6..6f7700cfc 100644 --- a/test/internal/config/blazer.yml +++ b/test/internal/config/blazer.yml @@ -65,7 +65,7 @@ audit: true from_email: blazer@example.org # webhook for Slack -slack_webhook_url: http://localhost:5000 +slack_webhook_url: http://localhost:3000 check_schedules: - "1 day" diff --git a/test/queries_test.rb b/test/queries_test.rb index 4e4dae9ab..ed97db7c9 100644 --- a/test/queries_test.rb +++ b/test/queries_test.rb @@ -93,4 +93,25 @@ def test_csv run_query("SELECT 1 AS id, 'Chicago' AS city", format: "csv") assert_equal "id,city\n1,Chicago\n", response.body end + + def test_url + run_query "SELECT 'http://localhost:3000/'" + assert_match %{http://localhost:3000/}, response.body + end + + def test_images_default + run_query("SELECT 'http://localhost:3000/image.png'") + refute_match %{}, response.body + end + + def test_images + previous_value = Blazer.images + begin + Blazer.images = true + run_query("SELECT 'http://localhost:3000/image.png'") + assert_match %{}, response.body + ensure + Blazer.images = previous_value + end + end end