Skip to content

Commit

Permalink
fixed a unit test that was incorrectly invoking an inline function
Browse files Browse the repository at this point in the history
  • Loading branch information
johnabass committed Jul 6, 2023
1 parent aa9a026 commit 8cae1c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func TestFunc(t *testing.T) {

//nolint:bodyclose
actual, actualErr := Func(func(r *http.Request) (*http.Response, error) {
assert.True(request == r)
assert.Same(request, r)
return expected, expectedErr
})(request)
}).Do(request)

assert.True(expected == actual)
assert.Equal(expectedErr, actualErr)
Expand Down
9 changes: 8 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
module github.com/xmidt-org/httpaux

go 1.14
go 1.20

require github.com/stretchr/testify v1.8.0

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

0 comments on commit 8cae1c1

Please sign in to comment.