Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@TestFor(MyController)
@TestMixin(OneTimeDataUnitTestMixin)
class MyControllerSpec extends Specification {
def setup() {
mockOneTimeData(this, controller)
}
def "should fail"() {
given:
params.valid = false
when:
controller.index()
then:
otdData.message == "failed!"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.