Details
Description
Unit Tests failed if in two tests (in one TestClass) create a mock instance of the same class (see attached testcase).
Tests errors :
Running 2 unit tests... 1 of 2
Output from testFirstCall--Running 2 unit tests... 2 of 2
Output from testSecondCall--
Failure: testSecondCall(com.zenika.MyControllerTests)
junit.framework.AssertionFailedError: No more calls to 'callMe' expected at this point. End of demands.
at grails.test.MockClosureProxy.doBeforeCall(MockClosureProxy.java:66)
at grails.test.AbstractClosureProxy.call(AbstractClosureProxy.java:74)
at com.zenika.MyController.index(MyController.groovy:10)
at com.zenika.MyControllerTests.executeCallTest(MyControllerTests.groovy:31)
at com.zenika.MyControllerTests.testSecondCall(MyControllerTests.groovy:19)Completed 2 unit tests, 1 failed in 3238ms Tests FAILED - view reports in target/test-reports
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Possible related issues :
GRAILS-8454,GRAILS-3615GRAILS-8454,GRAILS-3615