Integration test not recognising controller save method

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Integration test not recognising controller save method


I recently upgraded a project from 2.2 to 2.4.4, and upgraded the integration tests by replacing

IntegrationTest extends GroovyTestCase



My controllers have save methods e.g. :
class IssueController {
def save() {
        if (! {
            render(view: "create", model: [issueInstance: issue])

and the integration test (in test/integration) :
    void setUp() {
        ic = new IssueController()

    void testValidSave() {

    ic.params.issueNo = "test"
                assert ic.flash.successAlert ==  "Saved issue test"
                assert ic.response.redirectUrl == '/issue/list'

but my Integrations tests, when calling don't call the controller save method (and so fail). If I rename the save() method to say saveIt(), and the call to ic.saveIt(), everything works fine

but I don't want to have to rename all my controller method names,

I can't work out what's going on? Any ideas