Skip to content

Commit

Permalink
jurisdiction checker
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyclements committed May 1, 2024
1 parent b0cdf32 commit 670cba4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/testthat/tests-clinical_theatre_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ output_1 <- with(df1, clinical_theatre_emissions(wet_clinical_waste = clinical_w
plastic_units = "kg",
electricity_kWh = electricity_kwh))

output_with_cpi <- (clinical_theatre_data(df, time = time,
name = theatre,
wet_clinical_waste = clinical_waste,
wet_clinical_waste_unit = "kg",
average = general_waste,
plastic_units = "kg",
electricity_kWh = electricity_kwh,
include_cpi = TRUE,
jurisdiction = "United Kingdom",
year = 2023))[[1]]

test_that("reads in correct row of data", {
expect_equal(output[6,3], output_1)
})

test_that("reads in jurisdiction", {
expect_equal(names(output_with_cpi), c("time", "theatre", "emissions", "carbon_price_credit"))
})

0 comments on commit 670cba4

Please sign in to comment.