Skip to content

Business intelligence made simple

Improved CSV test

Andrew Kane1686ae4dc100
diff --git a/test/queries_test.rb b/test/queries_test.rb
index 9a812741..a7cae210 100644
--- a/test/queries_test.rb
+++ b/test/queries_test.rb
@@ -118,6 +118,8 @@ class QueriesTest < ActionDispatch::IntegrationTest
def test_csv
run_query("SELECT 1 AS id, 'Chicago' AS city", format: "csv")
assert_equal "id,city\n1,Chicago\n", response.body
+ assert_equal "attachment; filename=\"query.csv\"", response.headers["Content-Disposition"]
+ assert_equal "text/csv; charset=utf-8", response.headers["Content-Type"]
end
def test_url