Skip to content

Instantly share code, notes, and snippets.

@gratzc
Last active December 19, 2015 18:29
Show Gist options
  • Save gratzc/5999404 to your computer and use it in GitHub Desktop.
Save gratzc/5999404 to your computer and use it in GitHub Desktop.
MXUnit Decorator cfscript syntax
/**
* @mxunit:decorators mxunit.framework.decorators.TransactionRollbackDecorator
**/
component extends="coldbox.system.testing.BaseModelTest" model="model.SomeModel" {
void function setup() {
super.setup();
}
function testSomething() {
//transaction rollback happens so whatever happens is rolled back
var results = model.doSomething();
assertEquals("1", results);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment