Business intelligence made simple
Improved tests [skip ci]
Andrew Kane67c2b63698e4
diff --git a/test/queries_test.rb b/test/queries_test.rbindex 1c8b8ab5..2fe1d7c0 100644--- a/test/queries_test.rb+++ b/test/queries_test.rb@@ -7,13 +7,25 @@ class QueriesTest < ActionDispatch::IntegrationTestBlazer::Query.delete_allend- def test_index+ def test_homecreate_queryget blazer.root_pathassert_response :successassert_match "Test", response.bodyend+ def test_index+ get blazer.queries_path+ assert_redirected_to blazer.root_path+ end++ def test_index_json+ create_query+ get blazer.queries_path, as: :json+ assert_response :success+ assert_match "Test", response.body+ end+def test_createpost blazer.queries_path, params: {query: {name: "Test", statement: "SELECT 1", data_source: "main"}}query = Blazer::Query.last