Skip to content

Commit 6942400

Browse files
committed
fix: always restore routeIndex/staticRoutes in mapperModernSpec afterAll
The conditional restoration (only when non-empty) could leave stale test route data in the indexes when the originals were empty, corrupting route matching for subsequent test bundles. https://claude.ai/code/session_01BwY32HMZKTCitF9f3BSSJL
1 parent 69bfd39 commit 6942400

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

vendor/wheels/tests_testbox/specs/mapperModernSpec.cfc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ component extends="wheels.Testbox" {
1010

1111
function afterAll() {
1212
application.wheels.routes = _originalRoutes
13-
if (!StructIsEmpty(_originalRouteIndex)) {
14-
application.wheels.routeIndex = _originalRouteIndex
15-
}
16-
if (!StructIsEmpty(_originalStaticRoutes)) {
17-
application.wheels.staticRoutes = _originalStaticRoutes
18-
}
13+
application.wheels.routeIndex = _originalRouteIndex
14+
application.wheels.staticRoutes = _originalStaticRoutes
1915
}
2016

2117
function run() {

0 commit comments

Comments
 (0)