diff --git a/src/test/groovy/au/org/ala/ecodata/ProjectServiceSpec.groovy b/src/test/groovy/au/org/ala/ecodata/ProjectServiceSpec.groovy index 229d701aa..e63b11105 100644 --- a/src/test/groovy/au/org/ala/ecodata/ProjectServiceSpec.groovy +++ b/src/test/groovy/au/org/ala/ecodata/ProjectServiceSpec.groovy @@ -943,13 +943,11 @@ class ProjectServiceSpec extends MongoSpec implements ServiceUnitTest project1.managementUnitId = null project1.save(flush: true) - project1.metaClass.getDbo = { new BasicDBObject(project1.properties) } session.flush() - projectMap = service.toMap(project1, ProjectService.ALL) - result = service.getRepresentativeSitesOfProject(projectMap) } + projectMap = service.toMap(project1, ProjectService.ALL) + result = service.getRepresentativeSitesOfProject(projectMap) + then: result.isEmpty() }