From d62b4c3d072b4e6e43d3db32c083a6a27f18386d Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 19 Aug 2024 17:08:19 +1000 Subject: [PATCH] AtlasOfLivingAustralia/fieldcapture#3292 - fixed broken test? --- .../org/ala/ecodata/ProjectServiceSpec.groovy | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) 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() }