Updating spec to verify CredentialError is raised when appropriate.