Permalink
Browse files

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

This test is currently invoking notYetImplemented()
  • Loading branch information...
1 parent 5cf6328 commit 666315e90fa31c4a4128dd378c3b9d5e8d8e51fd @jeffbrown jeffbrown committed Nov 29, 2011
@@ -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()
+ }
+}

0 comments on commit 666315e

Please sign in to comment.