Browse files

functional test for previous commit

  • Loading branch information...
1 parent c20d0e7 commit f6a858653eee6a20ea3a32d3270b5748e96f1062 @graemerocher graemerocher committed Jul 20, 2009
View
5 grails-functional-tests/apps/spring/grails-app/controllers/TestController.groovy
@@ -48,4 +48,9 @@ class TestController implements ApplicationContextAware {
render "Resolver class = ${appCtx.getBean('localeResolver').class.name}"
}
+ def testScannedValidateable = {
+ def t = new beans.ValidateMe(name:"joebloggs")
+
+ render "valid = ${t.validate()}"
+ }
}
View
4 grails-functional-tests/apps/spring/spring.launch
@@ -9,8 +9,8 @@
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;spring&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/dist/grails-bootstrap-1.1-SNAPSHOT.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/lib/groovy-all-1.6.0.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/dist/grails-bootstrap-1.2-SNAPSHOT.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/lib/groovy-all-1.6.3.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/>
View
14 grails-functional-tests/apps/spring/src/groovy/beans/ValidateMe.groovy
@@ -0,0 +1,14 @@
+package beans
+
+import org.codehaus.groovy.grails.validation.*
+
+@Validateable
+class ValidateMe {
+
+ String name
+
+ static constraints = {
+ name size:1..12
+ }
+
+}
View
6 grails-functional-tests/apps/spring/test/functional/SpringBeanFunctionalTests.groovy
@@ -45,4 +45,10 @@ class SpringBeanFunctionalTests extends functionaltestplugin.FunctionalTestCase
assertContentContains 'Resolver class = org.springframework.web.servlet.i18n.FixedLocaleResolver'
}
+ void testSpringConfiguredValidateable() {
+ get('/test/testScannedValidateable')
+ assertStatus 200
+ assertContentContains 'valid = true'
+
+ }
}

0 comments on commit f6a8586

Please sign in to comment.