GRAILS-1019: Allowing expressions to be used with the 'disabled' attribute for g...
[grails.git] / test / groovy / org / codehaus / groovy / grails / orm / hibernate / ListMethodTests.groovy
blob111e14ed0a41b70bba9d48052d4d42f3d08b6c98
1 /**
2 * @author Graeme Rocher
3 * @since 1.0
4 *
5 * Created: Nov 22, 2007
6 */
7 package org.codehaus.groovy.grails.orm.hibernate
8 class ListMethodTests extends AbstractGrailsHibernateTests {
10 protected void onSetUp() {
11 gcl.parseClass '''
12 class ListableBook {
13 Long id
14 Long version
15 String title
17 '''
20 void testSortAndWithIgnoreCase() {
21 def bookClass = ga.getDomainClass("ListableBook").clazz
22 ['A','C','b', 'a', 'c', 'B'].each { bookClass.newInstance(title:it).save(flush:true) }
25 assertEquals( ['a','A','B','b', 'c', 'C'], bookClass.list(sort:'title').title )
26 assertEquals( ['A','B','C', 'a', 'b', 'c'], bookClass.list(sort:'title', ignoreCase:false).title )