The right time to refuse a search is always
peter-whittaker.com
peter-whittaker.com
Most of the time, the conversation quickly devolves due to the fact that I'm not the Police. Which is obviously irrelevant; but many people can't see the forest of their rights through the trees of an "authority figure".
Occasionally someone gets my point and conceeds that they, like everyone else, have things that are private.
No clue what Canada's stance is on this, but worth knowing before you stand your ground with the border guard.
http://www.wired.com/2013/06/why-i-have-nothing-to-hide-is-t...
http://m.chronicle.com/article/Why-Privacy-Matters-Even-if/1...