Commit 7cbab175 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

refactor(test): manage with case sensitivity of the QupstrUnit argument in...

refactor(test): manage with case sensitivity of the QupstrUnit argument in CreateInputsModel and fix test
Refs #110
parent 77fa9c32
Pipeline #22244 failed with stages
in 8 minutes and 10 seconds
......@@ -216,7 +216,8 @@ CreateInputsModel <- function(FUN_MOD,
if(any(LengthHydro > 1000)) {
warning("The unit of 'LengthHydro' has changed from m to km in v1.7 of airGR: values superior to 1000 km seem unrealistic")
}
QupstrUnit <- match.arg(arg = QupstrUnit, choices = c("mm", "m3", "m3/s", "l/s", "L/s"))
QupstrUnit <- tolower(QupstrUnit)
QupstrUnit <- match.arg(arg = QupstrUnit, choices = c("mm", "m3", "m3/s", "l/s"))
}
##check_NA_values
......
......@@ -51,7 +51,7 @@ test_that("'QupstrUnit' must correspond to one possible value", {
BasinAreas = BasinAreas,
QupstrUnit = "m3/h"
),
regexp = "'QupstrUnit' must be one of these values: 'mm', 'm3', 'm3/s', 'L/s' or 'l/s'"
regexp = "'arg' should be one of “mm, m3, m3/s, l/s"
)
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment