Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

GRAILS-8382 - Test calling super class method from mocked controller

This test is currently invoking notYetImplemented()
  • Loading branch information...
commit 666315e90fa31c4a4128dd378c3b9d5e8d8e51fd 1 parent 5cf6328
@jeffbrown jeffbrown authored
View
16 grails-test-suite-uber/src/test/groovy/grails/test/mixin/ControllerUnitTestMixinTests.groovy
@@ -32,6 +32,16 @@ class ControllerUnitTestMixinTests extends GroovyTestCase {
protected getMockController() {
mockController(TestController)
}
+
+ void testCallingSuperMethod() {
+ if(notYetImplemented()) return
+
+ def subController = mockController(SubController)
+
+ subController.method1()
+ assert response.status == HttpServletResponse.SC_OK
+ assert response.contentAsString == 'method 1'
+ }
void testSimpleControllerRedirect() {
@@ -518,3 +528,9 @@ class TestCommand {
name blank:false
}
}
+
+class SubController extends TestController {
+ def method1() {
+ super.method1()
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.