Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- fixed broken test
  • Loading branch information
temi committed Nov 15, 2023
1 parent 72825ae commit 42fbe01
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 32 deletions.
54 changes: 27 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@metahub/karma-jasmine-jquery": "^2.0.1",
"chromedriver": "117.0.3",
"chromedriver": "119.0.1",
"jasmine-core": "^3.5.0",
"jasmine-jquery": "^2.0.0",
"jquery": "3.6.2",
Expand Down
6 changes: 2 additions & 4 deletions src/test/groovy/au/org/ala/merit/AclInterceptorSpec.groovy
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package au.org.ala.merit


import grails.core.GrailsApplication
import grails.core.GrailsClass
import grails.testing.web.GrailsWebUnitTest
import grails.testing.web.interceptor.InterceptorUnitTest
import grails.web.http.HttpHeaders
import org.apache.http.HttpStatus
import spock.lang.Specification
Expand Down Expand Up @@ -148,7 +146,7 @@ class AclInterceptorSpec extends Specification implements GrailsWebUnitTest {
GrailsApplication grailsApp = Mock(GrailsApplication)
GrailsClass grailsClass = Mock(GrailsClass)
aclInterceptor.grailsApplication = grailsApp
aclInterceptor.webRequest.controllerName = "ManagementUnitController"
aclInterceptor.webRequest.controllerName = "ReportController"
aclInterceptor.webRequest.actionName = "generateReportsInPeriod"
params.id = "p1"

Expand All @@ -158,7 +156,7 @@ class AclInterceptorSpec extends Specification implements GrailsWebUnitTest {
then:
1 * aclInterceptor.grailsApplication.getArtefactByLogicalPropertyName("Controller", _) >> grailsClass
1 * aclInterceptor.roleService.getAugmentedRoles() >> ["alaAdmin","siteAdmin","officer","siteReadOnly","readOnly"]
1 * grailsClass.getClazz() >> ManagementUnitController.class
1 * grailsClass.getClazz() >> ReportController.class
1 * aclInterceptor.userService.getCurrentUserId() >> "test"
1 * aclInterceptor.userService.userIsAlaOrFcAdmin() >> false
1 * aclInterceptor.userService.userHasReadOnlyAccess() >> false
Expand Down

0 comments on commit 42fbe01

Please sign in to comment.