test_that("as_openapi_path modifies the path correctly", { expect_equal(as_openapi_path("/test/nothing"), "/test/nothing") expect_equal(as_openapi_path("/test/"), "/test/{arg}") expect_equal( as_openapi_path("/test//and/"), "/test/{arg}/and/{arg2}" ) expect_equal( as_openapi_path("/test//and/"), "/test/{arg}/and/{arg2}" ) }) test_that("as_routr_path modifies the path correctly", { expect_equal(as_routr_path("/test/nothing"), "/test/nothing") expect_equal(as_routr_path("/test/"), "/test/:arg") expect_equal( as_routr_path("/test//and/"), "/test/:arg/and/:arg2" ) expect_equal( as_routr_path("/test//and/"), "/test/:arg/and/:arg2" ) })