There is actually. There is a test, and it's in section 4 of the act. I can read from the provision. It's very short:
No personal information shall be collected by a government institution unless it relates directly to an operating program or activity of the institution.
The Treasury Board guidelines have said this expression “unless it relates directly” should mean a necessity test. Arguably, that's the only legal interpretation that's possible. If we say you shall not collect information unless it directly relates to a program, then basically it's saying you can't collect information you don't need.