From 2bed9e6ed84e28edcb16694be3f549459d0ff9cf Mon Sep 17 00:00:00 2001 From: quobix Date: Fri, 12 Apr 2024 11:07:32 -0400 Subject: [PATCH] fixed a couple of tests with missing examples after the code was updated, tests needing tuning. --- functions/openapi/examples_missing_test.go | 2 +- statistics/statistics_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/openapi/examples_missing_test.go b/functions/openapi/examples_missing_test.go index a64b4ab6..0e93c82a 100644 --- a/functions/openapi/examples_missing_test.go +++ b/functions/openapi/examples_missing_test.go @@ -57,7 +57,7 @@ paths: res := def.RunRule(nil, ctx) assert.Len(t, res, 2) - assert.Equal(t, "schema is missing `examples` or `example`", res[0].Message) + assert.Equal(t, "media type is missing `examples` or `example`", res[0].Message) assert.Contains(t, res[0].Path, "$.paths['/pizza'].get.requestBody.content['application/json']") } diff --git a/statistics/statistics_test.go b/statistics/statistics_test.go index 0d9bc3b8..a1524b95 100644 --- a/statistics/statistics_test.go +++ b/statistics/statistics_test.go @@ -46,7 +46,7 @@ func TestCreateReportStatistics_AlmostPerfect(t *testing.T) { //assert.Equal(t, 100, stats.OverallScore) // new missing examples function is now strict / correct - assert.Equal(t, 95, stats.OverallScore) + assert.Equal(t, 97, stats.OverallScore) }