Этот коммит содержится в:
Chris
2018-03-07 12:36:40 -06:00
коммит произвёл GitHub
родитель fd9ee780ed
Коммит e8943936c5
35 изменённых файлов: 30 добавлений и 665 удалений

Просмотреть файл

@@ -510,18 +510,6 @@ func CheckUserSanitization(t *testing.T, user *model.User) {
}
}
func CheckTeamSanitization(t *testing.T, team *model.Team) {
t.Helper()
if team.Email != "" {
t.Fatal("email wasn't blank")
}
if team.AllowedDomains != "" {
t.Fatal("'allowed domains' wasn't blank")
}
}
func CheckEtag(t *testing.T, data interface{}, resp *model.Response) {
t.Helper()
@@ -669,21 +657,6 @@ func CheckInternalErrorStatus(t *testing.T, resp *model.Response) {
}
}
func CheckPayLoadTooLargeStatus(t *testing.T, resp *model.Response) {
t.Helper()
if resp.Error == nil {
t.Fatal("should have errored with status:" + strconv.Itoa(http.StatusRequestEntityTooLarge))
return
}
if resp.StatusCode != http.StatusRequestEntityTooLarge {
t.Log("actual: " + strconv.Itoa(resp.StatusCode))
t.Log("expected: " + strconv.Itoa(http.StatusRequestEntityTooLarge))
t.Fatal("wrong status code")
}
}
func readTestFile(name string) ([]byte, error) {
path, _ := utils.FindDir("tests")
file, err := os.Open(path + "/" + name)

Просмотреть файл

@@ -510,7 +510,6 @@ func commandWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
}
func decodePayload(payload io.Reader) (*model.IncomingWebhookRequest, *model.AppError) {
decodeError := &model.AppError{}
incomingWebhookPayload, decodeError := model.IncomingWebhookRequestFromJson(payload)
if decodeError != nil {