Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withoutTenantRestriction not recognized by unit tests #48

Open
tbuchwalter opened this issue Sep 9, 2016 · 0 comments
Open

withoutTenantRestriction not recognized by unit tests #48

tbuchwalter opened this issue Sep 9, 2016 · 0 comments

Comments

@tbuchwalter
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant