I'm trying to write unit test for existing code (backwards approach, I know) and when I am using My_domain.withoutTenantRestriction{
// code here
}
to query the table regardless of current user's tenant I get errors in my tests that:
groovy.lang.MissingMethodException: No signature of method: com.sexingtechnologies.bullseye2.Location.withoutTenantRestriction() is applicable for argument types: (com.mypackage.orders.OrderManageController$_loadOrderManageDetails_closure5) values: [com.mypackage.orders.OrderManageController$_loadOrderManageDetails_closure5@ff47cbc]
with additional stack trace errors.
I've tried to use
My_domain.metaClass.withoutTenantRestriction{ Closure closure -> closure.call()}
but it still fails with the same errors.
How can I get the grails test-app to recognize this dynamic method / closure so that I can write my tests?
I'm trying to write unit test for existing code (backwards approach, I know) and when I am using My_domain.withoutTenantRestriction{ // code here }
to query the table regardless of current user's tenant I get errors in my tests that:
groovy.lang.MissingMethodException: No signature of method: com.sexingtechnologies.bullseye2.Location.withoutTenantRestriction() is applicable for argument types: (com.mypackage.orders.OrderManageController$_loadOrderManageDetails_closure5) values: [com.mypackage.orders.OrderManageController$_loadOrderManageDetails_closure5@ff47cbc]
with additional stack trace errors.I've tried to use
My_domain.metaClass.withoutTenantRestriction{ Closure closure -> closure.call()}
but it still fails with the same errors.How can I get the grails test-app to recognize this dynamic method / closure so that I can write my tests?