Skip to content

Commit

Permalink
functional test for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Jul 20, 2009
1 parent c20d0e7 commit f6a8586
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@ class TestController implements ApplicationContextAware {
render "Resolver class = ${appCtx.getBean('localeResolver').class.name}" render "Resolver class = ${appCtx.getBean('localeResolver').class.name}"
} }


def testScannedValidateable = {
def t = new beans.ValidateMe(name:"joebloggs")

render "valid = ${t.validate()}"
}
} }
4 changes: 2 additions & 2 deletions grails-functional-tests/apps/spring/spring.launch
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> <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;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/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.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/lib/groovy-all-1.6.3.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
</listAttribute> </listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/> <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/> <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/>
Expand Down
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,14 @@
package beans

import org.codehaus.groovy.grails.validation.*

@Validateable
class ValidateMe {

String name

static constraints = {
name size:1..12
}

}
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ class SpringBeanFunctionalTests extends functionaltestplugin.FunctionalTestCase
assertContentContains 'Resolver class = org.springframework.web.servlet.i18n.FixedLocaleResolver' 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.