Test for add_cred()