-
-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix expected-actual parameters in require.Equal
- Loading branch information
1 parent
e230c13
commit f875e9f
Showing
6 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,7 @@ func TestIssue187(t *testing.T) { | |
spec3, err := json.Marshal(doc3) | ||
require.NoError(t, err) | ||
const expected = `{"components":{"schemas":{"model.ProductSearchAttributeRequest":{"properties":{"filterField":{"type":"string"},"filterKey":{"type":"string"},"type":{"type":"string"},"values":{"$ref":"#/components/schemas/model.ProductSearchAttributeValueRequest"}},"title":"model.ProductSearchAttributeRequest","type":"object"},"model.ProductSearchAttributeValueRequest":{"properties":{"imageUrl":{"type":"string"},"text":{"type":"string"}},"title":"model.ProductSearchAttributeValueRequest","type":"object"}}},"info":{"contact":{"email":"[email protected]","name":"Test"},"description":"Test Golang Application","title":"Test","version":"1.0"},"openapi":"3.0.3","paths":{"/me":{"get":{"operationId":"someTest","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ProductSearchAttributeRequest"}}},"description":"successful operation"}},"summary":"Some test","tags":["probe"]}}}}` | ||
require.JSONEq(t, string(spec3), expected) | ||
require.JSONEq(t, expected, string(spec3)) | ||
|
||
err = doc3.Validate(context.Background()) | ||
require.NoError(t, err) | ||
|
@@ -163,7 +163,7 @@ paths: | |
"200": | ||
description: description | ||
` | ||
require.YAMLEq(t, string(spec3), expected) | ||
require.YAMLEq(t, expected, string(spec3)) | ||
|
||
err = doc3.Validate(context.Background()) | ||
require.NoError(t, err) | ||
|
@@ -190,5 +190,5 @@ securityDefinitions: | |
|
||
doc2, err := FromV3(doc3) | ||
require.NoError(t, err) | ||
require.Equal(t, doc2.SecurityDefinitions["OAuth2Application"].Flow, "application") | ||
require.Equal(t, "application", doc2.SecurityDefinitions["OAuth2Application"].Flow) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters