I like testing for the error message itself, because that's what actually gets sent to the user. It ensures that a human-intended error message is being sent, as opposed to something useless like "ERR 234325"