Skip to content

Commit

Permalink
fixed propagation of httpClient and jsonMarshaller for TableTests (#66)
Browse files Browse the repository at this point in the history
* fixed propagation of httpClient and jsonMarshaller for TableTests

* fixed propagation of httpClient and jsonMarshaller for TableTests
  • Loading branch information
Apologiz authored Feb 26, 2024
1 parent 9c6558e commit c79ad21
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,14 @@ func (qt *cute) PutNewTest(name string, r *http.Request, expect *Expect) TableTe

func (qt *cute) PutTests(params ...*Test) TableTest {
for _, param := range params {
if qt.baseProps != nil && qt.baseProps.httpClient != nil {
param.httpClient = qt.baseProps.httpClient
}

if qt.baseProps != nil && qt.baseProps.jsonMarshaler != nil {
param.jsonMarshaler = qt.baseProps.jsonMarshaler
}

// Validate, that first step is empty
if qt.countTests == 0 {
if qt.tests[0].Request.Base == nil &&
Expand Down

0 comments on commit c79ad21

Please sign in to comment.