Hi all,
We have a coldbox module which can be configured to run in two very different modes Public and Private. The configuration is set up in Coldbox.cfc
I am writing BDD tests and trying to figure out how to run a test using one version of the Public version of Coldbox.cfc and another test using the Private version of Coldbox.cfc. (see below).
I think I am getting confused around how Testbox works. I am thinking if I change the configMapping to either of the two Coldbox.cfc I can then reload coldbox (with the module) and be able to test each version.
Or am I off track here?
Thanks in advance.
Code (Coldbox 4.3/Testbox 2.5):
PRIVATE TEST
component extends=“coldbox.system.testing.BaseTestCase”{
function beforeAll(){
this.configMapping = “tests.resources.config.Coldbox_PRIVATE”;
this.loadColdBox = true;
super.beforeAll();
}
function afterAll(){
this.unloadColdBox = true;
super.afterAll();
}
function run … {
bla bla bla
});
}
}
PUBLIC TEST
component extends=“coldbox.system.testing.BaseTestCase”{
function beforeAll(){
this.configMapping = “tests.resources.config.Coldbox_PUBLIC”;
this.loadColdBox = true;
super.beforeAll();
}
function afterAll(){
this.unloadColdBox = true;
super.afterAll();
}
function run … {
bla bla bla
});
}
}