From 0b3208cdc4c714bca847257e5061cb8ac2b657f5 Mon Sep 17 00:00:00 2001 From: tomwilsonsco Date: Mon, 9 Sep 2024 11:09:47 +0000 Subject: [PATCH] Style code (GHA) --- tests/testthat/test-db_table_metadata.R | 32 +++++++++++++++---------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/tests/testthat/test-db_table_metadata.R b/tests/testthat/test-db_table_metadata.R index bfa29e4..8e0c407 100644 --- a/tests/testthat/test-db_table_metadata.R +++ b/tests/testthat/test-db_table_metadata.R @@ -1,13 +1,16 @@ test_that("basic sql created correctly", { check_sql <- glue::glue_sql( - "SELECT column_name, data_type, CHARACTER_MAXIMUM_LENGTH + "SELECT column_name, data_type, CHARACTER_MAXIMUM_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG = 'test_db' AND TABLE_SCHEMA = 'test_schema' - AND TABLE_NAME = 'test_tbl'") + AND TABLE_NAME = 'test_tbl'" + ) - expect_equal(col_query("test_db", "test_schema", "test_tbl"), - check_sql) + expect_equal( + col_query("test_db", "test_schema", "test_tbl"), + check_sql + ) }) test_that("char col lengths", { @@ -21,12 +24,13 @@ test_that("char col lengths", { "test_columns_info_updated.rds" )) - expect_equal(update_col_query(col_info_init), - col_info_updated) + expect_equal( + update_col_query(col_info_init), + col_info_updated + ) }) test_that("table stats SQL ok", { - col_info_updated <- readRDS(test_path( "testdata", "test_columns_info_updated.rds" @@ -38,9 +42,13 @@ test_that("table stats SQL ok", { )) - expect_equal(get_table_stats(1, - col_info_updated, - "test_schema", - "test_iris"), - check_sql) + expect_equal( + get_table_stats( + 1, + col_info_updated, + "test_schema", + "test_iris" + ), + check_sql + ) })