Skip to content
Snippets Groups Projects
Commit ece13395 authored by ronan.vignard's avatar ronan.vignard
Browse files

Nettoyage et ajout de skip_on_ci()

parent afea57cb
No related branches found
No related tags found
Loading
Pipeline #534447 passed
......@@ -18,27 +18,13 @@ test_that("modify_column_type works", {
role = "runner"),
expected = TRUE)
# Mock de la fonction table_exists pour simuler l'absence de la table
mockery::stub(modify_column_type, "table_exists", function(...) FALSE)
skip_on_ci()
# Vérification qu'une erreur est retournée en cas d'absence de la table à modifier
expect_error(
object = modify_column_type(host = "localhost", database = "collectr",
schema = "public", table = "ghost", role = "runner"),
regexp = "La table spécifiée n'existe pas dans la base de données.")
with_mocked_bindings(
{
expect_error(
object = modify_column_type(host = "localhost", database = "collectr",
schema = "public", table = "ghost",
role = "runner"),
regexp = "La table spécifiée n'existe pas dans la base de données."
)
},
table_exists = function(...) FALSE # Simule que la table n'existe pas
)
})
test_that("modify_column_type fails", {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment