grails / grails-core

The Grails Web Application Framework
http://grails.org
Apache License 2.0
2.78k stars 951 forks source link

GRAILS-10596: Spock tests always fail (404/302) #2955

Closed graemerocher closed 9 years ago

graemerocher commented 10 years ago

Original Reporter: bodiam Environment: Not Specified Version: 2.3 Migrated From: http://jira.grails.org/browse/GRAILS-10596

I've created a new issue for this, mostly because there are more people who have this issue (see http://spock-framework.3207229.n2.nabble.com/Spock-test-with-grails-2-3-always-fail-td7573397.html)

I have a simple application, 1 class (Person), 1 field (name), and when I have a proper Spec test for this (I filled the populate method with a valid name), the tests still fail:

{noformat} junit.framework.AssertionFailedError: Condition not satisfied:

status == 404 | | 302 false

at removeme.PersonControllerSpec.Test the update action performs an update on a valid domain instance(PersonControllerSpec.groovy:97)

{noformat}

See also this issue: http://jira.grails.org/browse/GRAILS-10595

graemerocher commented 10 years ago

bodiam said: See also http://jira.grails.org/browse/GRAILS-10599

graemerocher commented 10 years ago

graemerocher said: fixed in scaffolding plugin v2.0.1, you can upgrade in a 2.3.0 app to fix this problem