Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
test for GPMONGODB-160 "withCriteria ne - empty result"
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Feb 7, 2012
1 parent 800f031 commit ca96dd7
Showing 1 changed file with 21 additions and 1 deletion.
Expand Up @@ -9,7 +9,27 @@ import grails.gorm.tests.PetType
/**
*/
class InListQuerySpec extends GormDatastoreSpec{


@Issue("GPMONGODB-160")
void "Test that ne works for a single-ended association"() {
given:"Some test data"
createPets()
session.clear()

when:"Querying an association in a given list"
def saurapod = PetType.findByName('Saurapod')

def results = Pet.withCriteria {
ne 'type', saurapod
order "name"
}

then:"The correct results are returned"
results.size() == 2
results[0].name == "Flipper"
results[1].name == "T-rex"
}

@Issue('GPMONGODB-161')
void "Test that in queries work for single-ended associations"() {
given:"Some test data"
Expand Down

0 comments on commit ca96dd7

Please sign in to comment.