maint: better error reporting when test fails
This test ensures, among other things, that we get a log message. If that
fails, we were trying to call a random method on nil; making that an assertion
means that we get a nice message rather than a failure that needs decoding.
Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>