Rename TryAgainLater status code to ServerTimeout

This commit is contained in:
Clayton Coleman
2015-02-12 12:24:34 -05:00
parent 3bc8f4e793
commit c24f4a24b4
10 changed files with 31 additions and 31 deletions

View File

@@ -46,8 +46,8 @@ func TestErrorNew(t *testing.T) {
if IsForbidden(err) {
t.Errorf("expected to not be %s", api.StatusReasonForbidden)
}
if IsTryAgainLater(err) {
t.Errorf("expected to not be %s", api.StatusReasonTryAgainLater)
if IsServerTimeout(err) {
t.Errorf("expected to not be %s", api.StatusReasonServerTimeout)
}
if IsMethodNotSupported(err) {
t.Errorf("expected to not be %s", api.StatusReasonMethodNotAllowed)
@@ -68,8 +68,8 @@ func TestErrorNew(t *testing.T) {
if !IsForbidden(NewForbidden("test", "2", errors.New("reason"))) {
t.Errorf("expected to be %s", api.StatusReasonForbidden)
}
if !IsTryAgainLater(NewTryAgainLater("test", "reason")) {
t.Errorf("expected to be %s", api.StatusReasonTryAgainLater)
if !IsServerTimeout(NewServerTimeout("test", "reason")) {
t.Errorf("expected to be %s", api.StatusReasonServerTimeout)
}
if !IsMethodNotSupported(NewMethodNotSupported("foo", "delete")) {
t.Errorf("expected to be %s", api.StatusReasonMethodNotAllowed)