Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- fixed broken tests
  • Loading branch information
temi committed Aug 16, 2024
1 parent dd585d8 commit 4972b19
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,7 @@ class ProjectXlsExporterSpec extends Specification implements GrailsUnitTest {
],
"checkForBoundaryIntersectionInLayers" : [ "cl927", "cl11163" ]
]
Holders.grailsApplication = grailsApplication

defineBeans {
userService(UserService)
reportingService(ReportingService)
activityFormService(ActivityFormService)
}
Holders.grailsApplication.mainContext.registerBean('metadataService', MetadataService, { metadataService })
metadataService.getGeographicConfig() >> [
metadataService.getGeographicConfig(*_) >> [
contextual: [
state : 'cl927',
elect : 'cl11163'
Expand All @@ -56,7 +48,15 @@ class ProjectXlsExporterSpec extends Specification implements GrailsUnitTest {
]
metadataService.getGeographicFacetConfig("cl927") >> [grouped: false, name: "state"]
metadataService.getGeographicFacetConfig("cl11163") >> [grouped: false, name: "elect"]
projectService.orderLayerIntersectionsByAreaOfProjectSites(_) >> [:]
Holders.grailsApplication = grailsApplication

defineBeans {
userService(UserService)
reportingService(ReportingService)
activityFormService(ActivityFormService)
}
Holders.grailsApplication.mainContext.registerBean('metadataService', MetadataService, { metadataService })
projectService.orderLayerIntersectionsByAreaOfProjectSites(_) >> ["cl927": ["ACT"], "cl11163": ["bean", "fenner", "canberra"]]
outputFile = File.createTempFile('test', '.xlsx')
String name = outputFile.absolutePath
outputFile.delete() // The exporter will attempt to load the file if it exists, but we want a random file name.
Expand Down

0 comments on commit 4972b19

Please sign in to comment.