Skip to content

Commit

Permalink
Merge pull request #27 from programmfabrik/hotfix/empty-request-200
Browse files Browse the repository at this point in the history
fixed now checking for collect and break responses too
  • Loading branch information
martinrode authored Jul 29, 2020
2 parents 0dbab7a + 92a9a02 commit 0baac20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api_testcase.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ func (testCase Case) executeRequest(counter int) (compare.CompareResult, api.Req
}
apiResp.Format = expectedResponse.Format

if testCase.ResponseData != nil || len(testCase.StoreResponse) > 0 {
if testCase.ResponseData != nil || testCase.CollectResponse != nil ||
len(testCase.BreakResponse) > 0 || len(testCase.StoreResponse) > 0 {
apiRespJsonString, err = apiResp.ServerResponseToJsonString(false)
if err != nil {
testCase.LogReq(req)
Expand Down Expand Up @@ -472,7 +473,7 @@ func (testCase Case) responsesEqual(expected, got api.Response) (compare.Compare
if err != nil {
return compare.CompareResult{}, fmt.Errorf("error loading expected generic json: %s", err)
}
if testCase.ResponseData == nil {
if testCase.ResponseData == nil && testCase.CollectResponse == nil && len(testCase.BreakResponse) == 0 {
expected.Format.IgnoreBody = true
}
gotJSON, err := got.ServerResponseToGenericJSON(expected.Format, false)
Expand Down

0 comments on commit 0baac20

Please sign in to comment.