Update API codes (#336)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-09-08 23:57:26 -04:00
1 parent 99d5456d7a
commit f94f21fd97
74 files changed
+1557 -1802

No files matched your search

+4 -4
View File
@@ -99,10 +99,10 @@ func TestCrud(t *testing.T) {
assert.Nil(apiErr)
assert.True(existed, "Expected existing project when deleted, but it wasn't.")
_, apiErr, err = scps.Delete(tc.Context(), s.Id)
existed, apiErr, err = scps.Delete(tc.Context(), s.Id)
require.NoError(err)
assert.NotNil(apiErr)
assert.EqualValues(http.StatusForbidden, apiErr.Status, "Expected project to not exist when deleted, but it did.")
assert.Nil(apiErr)
assert.False(existed)
}
// TODO: Get better coverage for expected errors and error formats.
@@ -127,7 +127,7 @@ func TestErrors(t *testing.T) {
require.NoError(err)
// TODO: Should this be nil instead of just a Project that has no values set
assert.NotNil(apiErr)
assert.EqualValues(http.StatusForbidden, apiErr.Status)
assert.EqualValues(http.StatusNotFound, apiErr.Status)
_, apiErr, err = scps.Read(tc.Context(), "invalid id")
assert.NoError(err)