diff --git a/inst/extdata/fixture_corpus/data/summary_categories.parquet b/inst/extdata/fixture_corpus/data/summary_categories.parquet index 054efa2..d87566b 100644 Binary files a/inst/extdata/fixture_corpus/data/summary_categories.parquet and b/inst/extdata/fixture_corpus/data/summary_categories.parquet differ diff --git a/inst/extdata/fixture_corpus/manifest.json b/inst/extdata/fixture_corpus/manifest.json index a28403e..d86af01 100644 --- a/inst/extdata/fixture_corpus/manifest.json +++ b/inst/extdata/fixture_corpus/manifest.json @@ -1,7 +1,7 @@ { "schema_version": 6, - "built_at": "2026-07-23T16:14:30Z", - "pipeline_commit": "4f992a0", + "built_at": "2026-07-27T13:04:05Z", + "pipeline_commit": "6098baf", "fixture_note": "Four-year (2011, 2012, 2019, 2020) fixture for uscogdata tests. Full corpus available via USCOGDATA_URL. Regenerated for Phase R2 (schema_version 5, harmonization_map/harmonization_recipes/ series_breaks parquet tables added). 2011/2012 straddle the wide-aggregate -> modern-leaf format boundary exercised by basis= \"harmonized\" and recipe= queries; 2019/2020 retain the prior per-capita/CPI regression anchors. Full canonical_fips_xwalk master and canonical_alias lookup table included via data-raw/regenerate_fixture_corpus.R.", "data_vintage": { "source_vintages": { @@ -75,7 +75,7 @@ }, { "path": "data/summary_categories.parquet", - "sha256": "8e6fcd4dd9bb4723841a67233b19388c9762dfc23b4479501183cebf7ea3c1b5", + "sha256": "0985b607f3f35a8dff62c0561261ab6922423b81d11c07b03bcb3e3461f85e33", "description": "summary_categories.parquet" }, { diff --git a/tests/testthat/test-categories.R b/tests/testthat/test-categories.R index af802f8..74b6aa1 100644 --- a/tests/testthat/test-categories.R +++ b/tests/testthat/test-categories.R @@ -15,7 +15,18 @@ test_that("cog_categories(type = 'spending') returns only expenditure rows", { skip_if_no_corpus() r <- cog_categories(type = "spending") expect_true(all(r$category_type == "expenditure")) - expect_true(all(r$subtype %in% c("operations", "capital"))) + expect_true(all(r$subtype %in% c("operations", "capital", "intergovernmental"))) +}) + +test_that("cog_categories surfaces the intergovernmental spending subtype", { + skip_if_no_corpus() + r <- cog_categories(type = "spending") + expect_true("intergovernmental" %in% r$subtype) + # IG rows reuse the existing functional categories -- they add a subtype, + # not new category values. + ig_cats <- sort(unique(r$category[r$subtype == "intergovernmental"])) + direct_cats <- sort(unique(r$category[r$subtype != "intergovernmental"])) + expect_true(all(ig_cats %in% c(direct_cats, "Other Education"))) }) test_that("cog_categories(type = 'revenue') returns only revenue rows", {