Skip to content

Commit

Permalink
fix: fix tests
Browse files Browse the repository at this point in the history
unit tests were not fixed to reflect code changes.
  • Loading branch information
toumorokoshi committed Dec 11, 2024
1 parent 8915f43 commit 4550ba7
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions pkg/api/openapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ func TestGenerateParentPatternsWithParams(t *testing.T) {
In: "path",
Name: "database",
Required: true,
Type: "string",
Schema: &openapi.Schema{
Type: "string",
},
},
},
},
Expand Down Expand Up @@ -372,7 +374,9 @@ func TestGenerateParentPatternsWithParams(t *testing.T) {
In: "path",
Name: "database",
Required: true,
Type: "string",
Schema: &openapi.Schema{
Type: "string",
},
},
},
},
Expand Down Expand Up @@ -405,13 +409,17 @@ func TestGenerateParentPatternsWithParams(t *testing.T) {
In: "path",
Name: "account",
Required: true,
Type: "string",
Schema: &openapi.Schema{
Type: "string",
},
},
{
In: "path",
Name: "database",
Required: true,
Type: "string",
Schema: &openapi.Schema{
Type: "string",
},
},
},
},
Expand Down Expand Up @@ -446,7 +454,7 @@ func TestGenerateParentPatternsWithParams(t *testing.T) {
if gotParam.Name != wantParam.Name ||
gotParam.In != wantParam.In ||
gotParam.Required != wantParam.Required ||
gotParam.Type != wantParam.Type {
gotParam.Schema.Type != wantParam.Schema.Type {
t.Errorf("param[%d][%d] = %+v, want %+v", i, j, gotParam, wantParam)
}
}
Expand Down

0 comments on commit 4550ba7

Please sign in to comment.