generated from VLADIMIR/template
fix
This commit is contained in:
@@ -62,6 +62,12 @@ func TestTeamRegistrationHandler(t *testing.T) {
|
||||
if strings.Contains(res.Body.String(), "private database detail") {
|
||||
t.Fatal("private error exposed")
|
||||
}
|
||||
if tc.name == "invalid fields" && !strings.Contains(res.Body.String(), team_service.ErrInvalidRegistration.Error()) {
|
||||
t.Fatalf("public validation error missing: %s", res.Body.String())
|
||||
}
|
||||
if tc.name == "closed" && !strings.Contains(res.Body.String(), team_service.ErrRegistrationClosed.Error()) {
|
||||
t.Fatalf("public registration error missing: %s", res.Body.String())
|
||||
}
|
||||
if tc.name == "malformed" && !strings.Contains(res.Body.String(), "unexpected EOF") {
|
||||
t.Fatalf("malformed JSON reason missing: %s", res.Body.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user