Prevent scoped deprecation warning in rails 4
Trigger query in test compatible with AR 3 and 4.