func TestRevokeRequestSuccessful(t *testing.T) { testhelper.SetupHTTP() defer testhelper.TeardownHTTP() client := prepareAuthTokenHandler(t, "DELETE", http.StatusNoContent) res := tokens.Revoke(&client, "abcdef12345") testhelper.AssertNoErr(t, res.Err) }
func TestRevokeRequestError(t *testing.T) { testhelper.SetupHTTP() defer testhelper.TeardownHTTP() client := prepareAuthTokenHandler(t, "DELETE", http.StatusNotFound) res := tokens.Revoke(&client, "abcdef12345") if res.Err == nil { t.Errorf("Missing expected error from Revoke") } }