Skip to content

Commit

Permalink
Fixed tests after changing output for html-report
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Shanley <dshanley@splunk.com>
  • Loading branch information
daveshanley committed Jul 19, 2022
1 parent c6fc48a commit 4fbb58c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions functions/openapi/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func TestExamples_RunRule_Fail_Inline_Schema_Missing_Summary(t *testing.T) {
res := def.RunRule(nodes, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "Example `lime` missing a `summary`, examples need explaining", res[0].Message)
assert.Equal(t, "Example `lime` missing a `summary` - examples need explaining", res[0].Message)
assert.NotNil(t, res[0].Path)
}

Expand Down Expand Up @@ -679,6 +679,6 @@ func TestExamples_RunRule_Fail_ExternalAndValue(t *testing.T) {
res := def.RunRule(nodes, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "Example `lemon` is not valid: cannot use both `value` and `externalValue`, choose one or the other", res[0].Message)
assert.Equal(t, "Example `lemon` is not valid: cannot use both `value` and `externalValue` - choose one or the other", res[0].Message)
assert.NotNil(t, res[0].Path)
}
4 changes: 2 additions & 2 deletions functions/openapi/operation_descriptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func TestOperationDescription_CheckRequestBodyDescriptionExists(t *testing.T) {

assert.Len(t, res, 1)
assert.NotNil(t, res[0].Path)
assert.Equal(t, "Operation requestBody `post` at path `/fish/paste` is missing a description", res[0].Message)
assert.Equal(t, "Operation `requestBody` for method `post` at path `/fish/paste` is missing a description", res[0].Message)

}

Expand Down Expand Up @@ -148,7 +148,7 @@ func TestOperationDescription_CheckRequestBodyDescriptionMeetsLength(t *testing.

assert.Len(t, res, 1)
assert.NotNil(t, res[0].Path)
assert.Equal(t, "Operation `post` requestBody description at path `/fish/paste` must be at least 5 words "+
assert.Equal(t, "Operation `requestBody` for method `post` description at path `/fish/paste` must be at least 5 words "+
"long, (4 is not enough)", res[0].Message)

}
Expand Down
4 changes: 2 additions & 2 deletions functions/openapi/success_response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ paths:
res := def.RunRule(rootNode.Content, ctx)

assert.Len(t, res, 1)
assert.Equal(t, "Operation `fresh` must define at least a single 2xx or 3xx response", res[0].Message)
assert.Equal(t, "Operation `fresh` must define at least a single `2xx` or `3xx` response", res[0].Message)

}

Expand Down Expand Up @@ -89,7 +89,7 @@ paths:

assert.Len(t, res, 1)
assert.Equal(t, "Operation `undefined operation (no operationId)` must define at least a"+
" single 2xx or 3xx response", res[0].Message)
" single `2xx` or `3xx` response", res[0].Message)

}

Expand Down

0 comments on commit 4fbb58c

Please sign in to comment.