elpete
07/13/2022, 5:27 PMsetup()
.wil-shiftinsert
07/13/2022, 7:23 PMit( "shows TwoFactorActivationKey", function(){getFlashScope().put("userId",2, true );
DEBUG(getFlashScope().getall());
// Execute event or route via GET http method. Spice up accordingly
var event = get(
"Users/showTwoFactorActivationKey",
{
tenantCode: "someTenant"
}
);
wil-shiftinsert
07/13/2022, 7:26 PM// retrieve from previous step
var userId=flash.get("userId",-1);
writedump(UserId);
I would assume my UserId would be 2 now, but it still shows up as -1.
So probably I am doing something wrong. But what? Would be nice if there were some examples/documentation.elpete
07/13/2022, 8:25 PMBaseHandlerTest
and the BaseInterceptorTest
, but not the BaseTestCase
. I’ll see if we can get a PR for this.wil-shiftinsert
07/13/2022, 8:27 PMelpete
07/13/2022, 8:28 PMelpete
07/13/2022, 8:28 PMwil-shiftinsert
07/13/2022, 8:29 PMvariables.mockFlash = mockBox
.createMock( "coldbox.system.web.flash.MockFlash" )
.init( mockController );
variables.mockRequestService.$( "getFlashScope", variables.mockFlash );
elpete
07/13/2022, 8:29 PM// config/ColdBox.cfc
function testing() {
flash.scope = "mock";
}
elpete
07/13/2022, 8:30 PMENVIRONMENT
to testing
in some way it would load the mock flash.wil-shiftinsert
07/13/2022, 8:33 PMwil-shiftinsert
07/13/2022, 8:36 PMwil-shiftinsert
07/13/2022, 8:37 PM