fix(http): update test to use platform.Error

pull/10616/head
Chris Goller 2018-12-21 08:58:16 -06:00
parent 5297d1fee9
commit a33f3ff672
1 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,6 @@ package http
import ( import (
"context" "context"
"fmt"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"reflect" "reflect"
@ -39,7 +38,10 @@ func Test_queryOrganization(t *testing.T) {
ID: platform.ID(1), ID: platform.ID(1),
}, nil }, nil
} }
return nil, fmt.Errorf("unknown ID") return nil, &platform.Error{
Code: platform.EInvalid,
Msg: "unknown org name",
}
}, },
}, },
}, },
@ -69,7 +71,10 @@ func Test_queryOrganization(t *testing.T) {
Name: "org1", Name: "org1",
}, nil }, nil
} }
return nil, fmt.Errorf("unknown org name") return nil, &platform.Error{
Code: platform.EInvalid,
Msg: "unknown org name",
}
}, },
}, },
}, },